From 0b22ffeb50447f329c6d1fca49170c842ecae8ce Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Tue, 24 Mar 2026 14:57:09 +0300 Subject: [PATCH] =?utf8?q?refactor(ERP-33):=20=D1=83=D0=B1=D1=80=D0=B0?= =?utf8?q?=D1=82=D1=8C=20actionCleanup=20=E2=80=94=20=D0=BE=D1=87=D0=B8?= =?utf8?q?=D1=81=D1=82=D0=BA=D0=B0=20=D0=BD=D0=B5=20=D0=BD=D1=83=D0=B6?= =?utf8?q?=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/StockStateController.php | 18 ------------------ 1 file changed, 18 deletions(-) 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 { -- 2.39.5