From 17e3b00dd71f904e8cd21bcb33445c2ab734d49e Mon Sep 17 00:00:00 2001 From: Kocmonavtik <61938582+Kocmonavtik@users.noreply.github.com> Date: Thu, 22 Jun 2023 15:46:25 +0300 Subject: [PATCH] =?UTF-8?q?ref=20#90439=20=D0=9E=D0=B1=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=B0=20=D0=B8=D1=81=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=B0=D0=B3=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=20orderAgent=20(#300)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ .../classes/general/RCrmActions.php | 22 ++++++++++++++----- intaro.retailcrm/description.ru | 2 +- intaro.retailcrm/install/index.php | 5 ++++- intaro.retailcrm/install/version.php | 4 ++-- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f935322..bb794544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2023-06-22 v.6.3.15 +- Исправлено зависание агента выгрузки заказов + ## 2023-06-12 v.6.3.14 - Исправлена ошибка при изменении торгового предложения в товаре diff --git a/intaro.retailcrm/classes/general/RCrmActions.php b/intaro.retailcrm/classes/general/RCrmActions.php index d5cec5bd..11c7050f 100644 --- a/intaro.retailcrm/classes/general/RCrmActions.php +++ b/intaro.retailcrm/classes/general/RCrmActions.php @@ -220,6 +220,8 @@ class RCrmActions * Agent function * * @return self name + * + * @throws \Throwable */ public static function orderAgent() { @@ -227,12 +229,22 @@ class RCrmActions define('NO_AGENT_CHECK', true); } - $service = ManagerService::getInstance(); - $service->synchronizeManagers(); + try { + $service = ManagerService::getInstance(); + $service->synchronizeManagers(); - RetailCrmHistory::customerHistory(); - RetailCrmHistory::orderHistory(); - self::uploadOrdersAgent(); + RetailCrmHistory::customerHistory(); + RetailCrmHistory::orderHistory(); + self::uploadOrdersAgent(); + } catch (\Throwable $exception) { + RCrmActions::eventLog( + 'RCrmActions', + 'orderAgent', + $exception->getMessage() . PHP_EOL . + 'File: ' . $exception->getFile() . PHP_EOL . + 'Line: ' . $exception->getLine() . PHP_EOL + ); + } return 'RCrmActions::orderAgent();'; } diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index a8c09c58..c90f6ab4 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Исправлена ошибка при изменении торгового предложения в товаре \ No newline at end of file +- Исправлено зависание агента выгрузки заказов \ No newline at end of file diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index c2bfff77..c43f1d34 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -1082,7 +1082,10 @@ class intaro_retailcrm extends CModule $dateAgent->add($intAgent); CAgent::AddAgent( - 'RCrmActions::orderAgent();', $this->MODULE_ID, 'N', 600, // interval - 10 mins + 'RCrmActions::orderAgent();', + $this->MODULE_ID, + 'N', + 600, // interval - 10 mins $dateAgent->format('d.m.Y H:i:s'), // date of first check 'Y', // agent is active $dateAgent->format('d.m.Y H:i:s'), // date of first start diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index d04c2c01..a5868d5e 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,6 +1,6 @@ '6.3.14', - 'VERSION_DATE' => '2023-06-12 20:00:00' + 'VERSION' => '6.3.15', + 'VERSION_DATE' => '2023-06-22 15:30:00' ];