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

index f33a37a21719e8b4ba4f6ff8cf0341e14d8a3d7e..4561c5a0517802853864b96a40299668cdb668c1 100644 (file)
@@ -1785,7 +1785,8 @@ class CronController extends Controller
         }
         if (isset($task['status']) && $task['status'] === 'pending') {
             $task['status'] = 'running';
-            $cache->set($cacheKey, $task);
+            //$ok = $cache->set($cacheKey, $task);
+
 
             $log = new ScriptLauncherLog();
             $log->source = 'CronController';
@@ -1803,7 +1804,8 @@ class CronController extends Controller
                 Yii::error(json_encode($log->getErrors(), JSON_UNESCAPED_UNICODE));
                 LogService::apiErrorLog(json_encode(["error_id" => 8, "error" => $log->getErrors()], JSON_UNESCAPED_UNICODE));
             }
-            //$cache->delete($cacheKey);
+            $ok = $cache->delete($cacheKey);
+
             $service = new AutoPlannogrammaService();
             $year = (int)$task['year'];
             $month = (int)$task['month'];
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,