Schedule tasks hourly

This commit is contained in:
2024-11-10 23:39:03 +01:00
parent 527cf4ba52
commit a32996ccc3
2 changed files with 9 additions and 8 deletions

View File

@ -12,10 +12,10 @@ class Command(BaseCommand):
def handle(self, *args, **kwargs):
if not Schedule.objects.filter(name="Update converted prices").exists():
schedule(
"games.tasks.update_converted_prices",
"games.convert_price.update_converted_prices",
name="Update converted prices",
schedule_type="D",
next_run=now() + timedelta(days=1),
schedule_type=Schedule.HOURLY,
next_run=now() + timedelta(seconds=30),
)
self.stdout.write(
self.style.SUCCESS("Scheduled the update_converted_prices task.")