#133365: самовосстановление cron-задач, retention и деградация поля project

- catch (\Throwable) вместо \Exception в MoleController::actionIndex
- самовосстановление зависших строк (dateStart < now - stuckTimeout) прямо в actionIndex:
  сброс через reArm() или completed = 2 (COMPLETED_FAILED) после превышения maxRetries
- retention выполненных задач: config-параметр keepDays, MoleTask::forgetCompleted()
- фиксация логических часов: nextRunDate() — при ретрае/перепланировании dateAdd
  не остаётся в прошлом, а ставится now + period; счётчик попыток в status
- поле project устарело: убрано из выборки getAllTask(), форм, таблиц и поиска
This commit is contained in:
srybkin committed 2026-12-02 16:44:21 +04:00
1 parent a8b75789f3
commit c0defdb07e
9 files changed
+222 -22

No files matched your search

+8 -2
View File
@@ -4,6 +4,7 @@ use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\grid\GridView;
use app\components\Helper;
use dominion\cron\models\MoleTask;
/* @var $this yii\web\View */
/* @var $model app\models\MailType */
@@ -38,7 +39,7 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model,
'attributes' => [
'id',
'project',
// 'project', // устарело
'name',
'parentId',
'dateAdd:datetime',
@@ -65,7 +66,12 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'completed',
'value' => function($model)
{
return $model->completed ? Yii::t('mole', 'Yes') : Yii::t('mole', 'No');
switch ((int)$model->completed)
{
case MoleTask::COMPLETED_DONE: return Yii::t('mole', 'Yes');
case MoleTask::COMPLETED_FAILED: return Yii::t('mole', 'Failed');
default: return Yii::t('mole', 'No');
}
},
],
'priority',