]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
refactor(ERP-33): убрать actionCleanup — очистка не нужна
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 24 Mar 2026 11:57:09 +0000 (14:57 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 24 Mar 2026 11:57:09 +0000 (14:57 +0300)
erp24/commands/StockStateController.php

index c156de0efbdbd6fac61a910dcc29c7a6bd5bd06e..f3f1181e7921db61059a02d9fdefe6a3aeb58d55 100644 (file)
@@ -14,7 +14,6 @@ use Yii;
  *
  * Crontab:
  *   0 8 * * * cd /www && php yii stock-state/collect >> /var/log/stock-state.log 2>&1
- *   0 3 1 * * cd /www && php yii stock-state/cleanup >> /var/log/stock-state.log 2>&1
  */
 class StockStateController extends Controller
 {
@@ -56,23 +55,6 @@ class StockStateController extends Controller
         }
     }
 
-    /**
-     * Удалить закрытые записи старше retention.
-     * @param int $months Retention в месяцах (default 24).
-     */
-    public function actionCleanup(int $months = 24): int
-    {
-        $this->stdout("Cleaning up closed records older than {$months} months...\n");
-
-        try {
-            $deleted = $this->createService()->cleanupOldRecords($months);
-            $this->stdout("Deleted {$deleted} old records.\n");
-            return ExitCode::OK;
-        } catch (\Throwable $e) {
-            $this->stderr("ERROR: {$e->getMessage()}\n");
-            return ExitCode::SOFTWARE;
-        }
-    }
 
     private function createService(): StockStateService
     {