lingo: limit async payment notification to a few hours (#23188)

This commit is contained in:
Frédéric Péters 2018-04-15 15:47:49 +02:00
parent 69ac9adf88
commit 39ef627bab
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ class Command(BaseCommand):
for item in BasketItem.objects.filter(
notification_date__isnull=True,
cancellation_date__isnull=True,
payment_date__lt=now-datetime.timedelta(minutes=5)):
payment_date__lt=now-datetime.timedelta(minutes=5),
payment_date__gt=now-datetime.timedelta(minutes=300)):
try:
item.notify_payment()
except: