feat(events): harden registration checkout lifecycle

This commit is contained in:
2026-10-01 12:26:49 +03:30
parent 1daa755543
commit 962238c32c
29 changed files with 3048 additions and 207 deletions

View File

@@ -38,6 +38,21 @@ app.conf.beat_schedule = {
'schedule': crontab(hour=2, minute=0),
'description': 'Runs daily at 02:00 UTC to cleanup notification retention.',
},
'sweep-stale-payment-verifications': {
'task': 'apps.payments.sweep_stale_payment_verifications',
'schedule': crontab(minute='*/5'),
'description': 'Recovers old unresolved payment attempts with bounded gateway verification.',
},
'expire-stale-registration-checkouts': {
'task': 'apps.events.expire_stale_registration_checkouts',
'schedule': crontab(minute='*'),
'description': 'Releases seats from paid checkouts after their 15-minute window.',
},
'sweep-pending-refunds': {
'task': 'apps.payments.sweep_pending_refunds',
'schedule': crontab(minute='*/5'),
'description': 'Recovers pending transaction reversals and exposes exhausted attempts for admin review.',
},
}
CELERY_TASK_SOFT_TIME_LIMIT = 20

View File

@@ -6,5 +6,6 @@ ZARINPAL_USE_SANDBOX = config('ZARINPAL_USE_SANDBOX', default=False, cast=bool)
ZARINPAL_API_BASE = "https://sandbox.zarinpal.com" if ZARINPAL_USE_SANDBOX else "https://payment.zarinpal.com"
ZARINPAL_REQUEST_URL = f"{ZARINPAL_API_BASE}/pg/v4/payment/request.json"
ZARINPAL_VERIFY_URL = f"{ZARINPAL_API_BASE}/pg/v4/payment/verify.json"
ZARINPAL_REVERSE_URL = f"{ZARINPAL_API_BASE}/pg/v4/payment/reverse.json"
ZARINPAL_STARTPAY = f"{ZARINPAL_API_BASE}/pg/StartPay/"
ZARINPAL_CALLBACK_URL = config('ZARINPAL_CALLBACK_URL', default='http://localhost:8000/api/payments/callback')