diff --git a/games/apps.py b/games/apps.py index 9443bc5..cc6588c 100644 --- a/games/apps.py +++ b/games/apps.py @@ -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), diff --git a/games/management/commands/schedule_update_task.py b/games/management/commands/schedule_convert_prices.py similarity index 92% rename from games/management/commands/schedule_update_task.py rename to games/management/commands/schedule_convert_prices.py index 50d970c..59af680 100644 --- a/games/management/commands/schedule_update_task.py +++ b/games/management/commands/schedule_convert_prices.py @@ -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), diff --git a/games/convert_price.py b/games/tasks.py similarity index 98% rename from games/convert_price.py rename to games/tasks.py index 815b3a0..93558a7 100644 --- a/games/convert_price.py +++ b/games/tasks.py @@ -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 )