diff --git a/.env-sample b/.env-sample index c3e55f6d..0d4ac85d 100644 --- a/.env-sample +++ b/.env-sample @@ -100,7 +100,7 @@ PROPORTIONAL_ROUTING_FEE_LIMIT = 0.001 MIN_FLAT_ROUTING_FEE_LIMIT = 10 MIN_FLAT_ROUTING_FEE_LIMIT_REWARD = 2 # Routing timeouts -REWARDS_TIMEOUT_SECONDS = 60 +REWARDS_TIMEOUT_SECONDS = 30 PAYOUT_TIMEOUT_SECONDS = 90 # REVERSE SUBMARINE SWAP PAYOUTS diff --git a/api/tasks.py b/api/tasks.py index 205ca91c..a0e790a6 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -172,7 +172,7 @@ def payments_cleansing(): """ Deletes cancelled payments (hodl invoices never locked) that belong to orders expired more than 3 days ago. - Deletes cancelled onchain_payments + Deletes 'cancelled' or 'create' onchain_payments """ from django.db.models import Q @@ -202,7 +202,7 @@ def payments_cleansing(): pass # same for onchain payments - queryset = OnchainPayment.objects.filter(Q(status=OnchainPayment.Status.CANCE), + queryset = OnchainPayment.objects.filter(Q(status__in=[OnchainPayment.Status.CANCE, OnchainPayment.Status.CREAT]), Q(order_paid_TX__expires_at__lt=finished_time)) # And do not have an active trade, any past contract or any reward.