Rename tasks

This commit is contained in:
Lukáš Kucharczyk 2024-11-11 01:12:09 +01:00
parent 63e307d251
commit 6aef44d3dc
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ def schedule_tasks(sender, **kwargs):
if not Schedule.objects.filter(name="Update converted prices").exists():
schedule(
"games.convert_price.update_converted_prices",
"games.tasks.convert_prices",
name="Update converted prices",
schedule_type=Schedule.MINUTES,
next_run=now() + timedelta(seconds=30),

View File

@ -12,7 +12,7 @@ class Command(BaseCommand):
def handle(self, *args, **kwargs):
if not Schedule.objects.filter(name="Update converted prices").exists():
schedule(
"games.convert_price.update_converted_prices",
"games.tasks.convert_prices",
name="Update converted prices",
schedule_type=Schedule.MINUTES,
next_run=now() + timedelta(seconds=30),

View File

@ -16,7 +16,7 @@ def save_converted_info(purchase, converted_price, converted_currency):
purchase.save()
def update_converted_prices():
def convert_prices():
purchases = Purchase.objects.filter(
converted_price__isnull=True, converted_currency__isnull=True
)