diff --git a/src/modules/payments/cron/payments.cron.ts b/src/modules/payments/cron/payments.cron.ts index e573b54..bb5bcf6 100644 --- a/src/modules/payments/cron/payments.cron.ts +++ b/src/modules/payments/cron/payments.cron.ts @@ -21,13 +21,10 @@ export class PaymentsCron { const payments = await this.paymentRepository.find({ where: { status: In([PaymentStatusEnum.RETRY, PaymentStatusEnum.PROCESSING]), + attempts: In([1, 2, 3]), }, }); - this.logger.debug( - `Found ${payments.length} payments in processing or retry status`, - ); - if (payments.length > 0) { for (const payment of payments) { await this.processPaymentService.execute(payment.id);