]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Изменение логики работы задачи
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 2 Jul 2025 11:33:49 +0000 (14:33 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 2 Jul 2025 11:33:49 +0000 (14:33 +0300)
erp24/commands/CronController.php
erp24/config/console.php
erp24/config/web.php
erp24/controllers/CategoryPlanController.php

index 4561c5a0517802853864b96a40299668cdb668c1..f37c189c7d945288754604107cc627c7a915a08b 100644 (file)
@@ -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();
index abb400af9214b1a1bdad5872fb33188f7894a76d..660baa1df4df5fb4ea1c7e14af4f4deab5280a3c 100755 (executable)
@@ -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' => [
index 874a787cffbab6fa48529b26386c64cf4b859def..6e9ef8642995d3b0f667adb58d517d622033d54c 100644 (file)
@@ -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',
index 65492e808d7d5c64772ffa9b8e37f14e7fa97131..3fed6dbc70822bf1276a8a1db8e15ed4f750b419 100644 (file)
@@ -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,