Ejemplo n.º 1
0
 /**
  * After action
  *
  * @param $event \yii\base\ActionEvent
  */
 public function afterAction($event)
 {
     if ($this->schedule) {
         if ($event->result === false) {
             $exitCode = CronScheduleStatus::ERROR;
         } else {
             $exitCode = CronScheduleStatus::SUCCESS;
         }
         $this->schedule->endCronSchedule($exitCode);
         $this->schedule = null;
     }
 }
Ejemplo n.º 2
0
 /**
  * Run action
  */
 public function run()
 {
     $dataProvider = new ActiveDataProvider(['query' => CronScheduleModel::find(), 'pagination' => ['pageSize' => 20], 'sort' => ['defaultOrder' => ['id' => SORT_DESC]]]);
     return $this->controller->render($this->view, ['dataProvider' => $dataProvider]);
 }