Implement converting prices #79

Merged
lukas merged 22 commits from converted_prices into main 2024-11-11 16:36:58 +00:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 6aef44d3dc - Show all commits

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
)