Skip to content

Commit

Permalink
fixed logic for # of times cron executes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsharma1100 committed Jul 21, 2022
1 parent f3bec2f commit e6c8e79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Cron/UpdateOrdersToProcessing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
}
}
Expand Down

0 comments on commit e6c8e79

Please sign in to comment.