From d2911b3ba3a50fab09c79d9117682dbc963847fb Mon Sep 17 00:00:00 2001 From: fomichev Date: Wed, 2 Jul 2025 14:33:49 +0300 Subject: [PATCH] =?utf8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?utf8?q?=D0=B5=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B8=20=D1=80=D0=B0?= =?utf8?q?=D0=B1=D0=BE=D1=82=D1=8B=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/CronController.php | 2 +- erp24/config/console.php | 5 +++-- erp24/config/web.php | 5 +++-- erp24/controllers/CategoryPlanController.php | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/erp24/commands/CronController.php b/erp24/commands/CronController.php index 4561c5a0..f37c189c 100644 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@ -1785,7 +1785,7 @@ class CronController extends Controller } if (isset($task['status']) && $task['status'] === 'pending') { $task['status'] = 'running'; - //$ok = $cache->set($cacheKey, $task); + $ok = $cache->set($cacheKey, $task); $log = new ScriptLauncherLog(); diff --git a/erp24/config/console.php b/erp24/config/console.php index abb400af..660baa1d 100755 --- a/erp24/config/console.php +++ b/erp24/config/console.php @@ -42,8 +42,8 @@ $config = [ // ], 'queue' => [ 'class' => Queue::class, - // 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@rabbitmq-yii_erp24:5672', - 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@localhost:5672', + 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@rabbitmq-yii_erp24:5672', + //'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@localhost:5672', 'queueName' => 'telegram-queue', 'as log' => \yii\queue\LogBehavior::class, 'ttr' => 300, // Время для выполнения задания @@ -55,6 +55,7 @@ $config = [ ], 'cache' => [ 'class' => 'yii\caching\FileCache', + 'cachePath' => '@yii_app/runtime/cache', ], 'log' => [ 'targets' => [ diff --git a/erp24/config/web.php b/erp24/config/web.php index 874a787c..6e9ef864 100644 --- a/erp24/config/web.php +++ b/erp24/config/web.php @@ -42,8 +42,8 @@ $config = [ ], 'queue' => [ 'class' => Queue::class, - // 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@rabbitmq-yii_erp24:5672', - 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@localhost:5672', + 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@rabbitmq-yii_erp24:5672', + //'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@localhost:5672', 'queueName' => 'telegram-queue', 'as log' => \yii\queue\LogBehavior::class, 'ttr' => 300, // Время для выполнения задания @@ -55,6 +55,7 @@ $config = [ ], 'cache' => [ 'class' => 'yii\caching\FileCache', + 'cachePath' => '@yii_app/runtime/cache', ], 'user' => [ 'identityClass' => \yii_app\records\Admin::class, // 'app\models\User', diff --git a/erp24/controllers/CategoryPlanController.php b/erp24/controllers/CategoryPlanController.php index 65492e80..3fed6dbc 100644 --- a/erp24/controllers/CategoryPlanController.php +++ b/erp24/controllers/CategoryPlanController.php @@ -645,7 +645,7 @@ class CategoryPlanController extends Controller { return $this->asJson(['status' => 'not_found']); } } - Yii::$app->cache->delete('apRecalculateTask'); + //Yii::$app->cache->delete('apRecalculateTask'); return $this->asJson([ 'status' => $task['status'], 'progress' => $task['progress'] ?? 0, -- 2.39.5