Exemplo n.º 1
0
 public function fire()
 {
     $rows = [];
     $tasks = Task::all();
     foreach ($tasks as $task) {
         $tm = new TaskManager($task);
         $rows[] = [$task->id, $task->title, $task->is_running ? '<fg=yellow;options=bold>' . $tm->info->getProgress() . '%</>' : '<fg=magenta>No</>', $task->last_run];
     }
     $table = $this->getHelper('table');
     $this->line('');
     $this->table(array('id', 'title', 'running', 'last run'), $rows);
     $this->line('');
 }
Exemplo n.º 2
0
 public function getAll()
 {
     return Task::all();
 }