Fix payments cleansing

This commit is contained in:
Reckless_Satoshi 2022-06-21 06:32:35 -07:00
parent c12c18a5c7
commit e525b84c9e
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
2 changed files with 2 additions and 3 deletions

View File

@ -202,10 +202,9 @@ def payments_cleansing():
pass
# same for onchain payments
queryset = OnchainPayment.objects.filter(Q(status=OnchainPayment.Status.CANCEL),
queryset = OnchainPayment.objects.filter(Q(status=OnchainPayment.Status.CANCE),
Q(order_paid_TX__expires_at__lt=finished_time))
# And do not have an active trade, any past contract or any reward.
deleted_onchainpayments = []
for onchainpayment in queryset:

View File

@ -40,7 +40,7 @@ app.conf.beat_schedule = {
"schedule": crontab(hour=0, minute=0),
},
"lnpayments-cleansing": { # Cleans 3+ days old unlocked hodl invoices
"task": "lnpayments_cleansing",
"task": "payments_cleansing",
"schedule": crontab(hour=0, minute=0),
},
"give-rewards": { # Referral rewards go from 'pending' to 'earned' at midnight