From 0d0d2c849a1528172e9eca633702e30b0408d93d Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Fri, 8 Jul 2022 15:48:52 +0300 Subject: [PATCH] =?UTF-8?q?[*]=20MQ=20=D0=BC=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B8=20=D0=B4=D0=BE?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D0=B0=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D1=88=D0=B8?= =?UTF-8?q?=D1=85=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Core/Models/MQ.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/lib/Core/Models/MQ.class.php b/core/lib/Core/Models/MQ.class.php index 197badb..8ce99f7 100644 --- a/core/lib/Core/Models/MQ.class.php +++ b/core/lib/Core/Models/MQ.class.php @@ -79,9 +79,9 @@ const DEFAULT_ATTEMPTS = 1; /** - * Время, после которого задача считается повисшей (10 минут) + * Время, после которого задача считается повисшей (5 минут) */ - const STUCK_TIME = 60*10; + const STUCK_TIME = 60*5; /** * @var null $priority Приоритет задания @@ -142,7 +142,7 @@ */ public static function test2(...$params): string { - //sleep(rand(10, 30)); + sleep(rand(10, 30)); $result = rand(0, 100); if (($result % 2) == 0) { throw new CoreException('Сервер обмена временно недоступен'); @@ -728,7 +728,7 @@ ); Log::logToFile( - 'Задания были возвращены в работу', + 'Задания были возвращены в работу (' . count($arStuckTasks) . ')', self::LOG_FILE, ['tasks' => json_encode($arStuckTasks, JSON_UNESCAPED_UNICODE)], LOG_DEBUG,