Skip to content

Commit

Permalink
MAGETWO-83782: [2.2] Cron_schedule forever increasing in size. Lots o…
Browse files Browse the repository at this point in the history
…f pending jobs never cleared
  • Loading branch information
Oleksandr Gorkun committed Feb 8, 2018
1 parent 03bb798 commit 5927a75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
if ($schedule->tryLockJob()) {
$this->_runJob($scheduledTime, $currentTime, $jobConfig, $schedule, $groupId);
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
$schedule->setMessages($e->getMessage());
if ($schedule->getStatus() === Schedule::STATUS_ERROR) {
$this->logger->critical($e);
Expand Down Expand Up @@ -259,7 +259,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
* @param Schedule $schedule
* @param string $groupId
* @return void
* @throws \Exception
* @throws \Throwable
*/
protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule, $groupId)
{
Expand Down Expand Up @@ -290,7 +290,7 @@ protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule,

try {
call_user_func_array($callback, [$schedule]);
} catch (\Exception $e) {
} catch (\Throwable $e) {
$schedule->setStatus(Schedule::STATUS_ERROR);
throw $e;
}
Expand Down

0 comments on commit 5927a75

Please sign in to comment.