diff --git a/core/bootstrap.php b/core/bootstrap.php index 8dd70c1..4daa2ec 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -105,11 +105,18 @@ } // debug - function sendTelegram(?string $message): void + function sendTelegram(?string $message, ?string $file = null): void { (new \Core\ExternalServices\TelegramSender(TELEGRAM_BOT_TOKEN)) ->setChat(TELEGRAM_NOTIFICATION_CHANNEL) ->sendMessage($message); + + if(!empty($file)) { + (new \Core\ExternalServices\TelegramSender(TELEGRAM_BOT_TOKEN)) + ->setChat(TELEGRAM_NOTIFICATION_CHANNEL) + ->sendDocument($file); + } + } //end debug diff --git a/core/lib/Core/Models/MQ.class.php b/core/lib/Core/Models/MQ.class.php index 8ce99f7..1538b25 100644 --- a/core/lib/Core/Models/MQ.class.php +++ b/core/lib/Core/Models/MQ.class.php @@ -727,6 +727,8 @@ ) . ')' ); + sendTelegram('Задания были возвращены в работу (' . count($arStuckTasks) . ' шт)' . PHP_EOL . implode(', ', $arStuckTasks)); + Log::logToFile( 'Задания были возвращены в работу (' . count($arStuckTasks) . ')', self::LOG_FILE,