Update payment-sync.service.ts

This commit is contained in:
Abubeker Yasin
2026-07-30 10:56:56 +03:00
parent 920333bf2a
commit e4a2c61224

View File

@@ -18,7 +18,7 @@ export class PaymentSyncService {
) {}
// ─────────────────────────────────────────────────────────────────────────
// Every 1 min: poll the payment service for any PENDING_PAYMENT bookings
// Every 30 min: poll the payment service for any PENDING_PAYMENT bookings
// whose payment intent has moved to SUCCEEDED on the gateway but whose
// confirmation event was never delivered (missed RabbitMQ message, network
// blip, etc.). finalizePaymentSuccess() is fully idempotent so re-running
@@ -27,7 +27,7 @@ export class PaymentSyncService {
// Processes at most 50 bookings per cycle to avoid hammering the payment
// service; the next tick picks up the remainder.
// ─────────────────────────────────────────────────────────────────────────
@Cron('*/1 * * * *')
@Cron('*/30 * * * *')
async syncPaymentStatuses() {
const BATCH_SIZE = 50;