From: Aleksey Filippov Date: Tue, 24 Mar 2026 11:57:09 +0000 (+0300) Subject: refactor(ERP-33): убрать actionCleanup — очистка не нужна X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0b22ffeb50447f329c6d1fca49170c842ecae8ce;p=erp24_rep%2Fyii-erp24%2F.git refactor(ERP-33): убрать actionCleanup — очистка не нужна --- diff --git a/erp24/commands/StockStateController.php b/erp24/commands/StockStateController.php index c156de0e..f3f1181e 100644 --- a/erp24/commands/StockStateController.php +++ b/erp24/commands/StockStateController.php @@ -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 {