From e6c8e79dcc0e6be9039a903f24afaac7da3e31cf Mon Sep 17 00:00:00 2001 From: nikhilsharma1100 Date: Thu, 21 Jul 2022 13:26:01 +0530 Subject: [PATCH] fixed logic for # of times cron executes --- Cron/UpdateOrdersToProcessing.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cron/UpdateOrdersToProcessing.php b/Cron/UpdateOrdersToProcessing.php index 3c8f3f6e..619ab8e9 100644 --- a/Cron/UpdateOrdersToProcessing.php +++ b/Cron/UpdateOrdersToProcessing.php @@ -111,7 +111,7 @@ public function execute() $searchCriteria = $this->searchCriteriaBuilder ->addFilter( 'rzp_update_order_cron_status', - 6, + 5, 'lt' )->addFilter( 'rzp_webhook_notified_at', //rzp_webhook_notified_at @@ -141,6 +141,10 @@ public function execute() else { $this->logger->info('Razorpay Webhook code not triggered yet. \'rzp_webhook_data\' is empty'); + + $cronRunCount = $order->getRzpUpdateOrderCronStatus(); + $order->setRzpUpdateOrderCronStatus($cronRunCount+1); + $order->save(); } } }