From 50e7841a1b3dbc529bd9525b8d268e980f1ef73a Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Sat, 9 Jul 2022 23:13:03 +0300 Subject: [PATCH] =?UTF-8?q?[*]=20MQ=20=D0=BD=D0=B0=D0=B2=D0=B5=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D1=83=D1=8E=20=D0=BA?= =?UTF-8?q?=D1=80=D0=B0=D1=81=D0=BE=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Core/Models/MQ.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/lib/Core/Models/MQ.class.php b/core/lib/Core/Models/MQ.class.php index cd72e15..8c519d8 100644 --- a/core/lib/Core/Models/MQ.class.php +++ b/core/lib/Core/Models/MQ.class.php @@ -562,10 +562,10 @@ $this->DB->update( self::TABLE, ['id' => $taskId], [ - 'active' => self::VALUE_Y, - 'in_progress' => self::VALUE_Y, + 'active' => self::VALUE_Y, + 'in_progress' => self::VALUE_Y, 'date_updated' => date(self::DATETIME_FORMAT), - 'attempts' => $arTask['attempts'], + 'attempts' => $arTask['attempts'], ] ); @@ -772,8 +772,7 @@ ); if (!empty($runTasks)) { foreach ($runTasks as $task) { - if ( - (!empty($task['date_updated']) && (time() - strtotime($task['date_updated'])) > self::STUCK_TIME) // Повисшие надолго + if ((!empty($task['date_updated']) && (time() - strtotime($task['date_updated'])) > self::STUCK_TIME) // Повисшие надолго || empty($task['date_updated']) // Криво запущенные ) { $arStuckTasks[] = (int)$task['id'];