Esempio n. 1
0
 /**
  * Determine if a scheduled command is in the correct environment
  *
  * @param \Indatus\Dispatcher\Scheduling\ScheduledCommandInterface $command
  *
  * @return bool
  */
 public function runnableInEnvironment(ScheduledCommandInterface $command)
 {
     $environment = $command->environment();
     //if any
     if ($environment == '*' || $environment == App::environment()) {
         return true;
     }
     if (is_array($environment) && in_array(App::environment(), $environment)) {
         return true;
     }
     return false;
 }
 protected function printCommandLabel(ScheduledCommandInterface $command)
 {
     $this->table->addRow(array(is_array($command->environment()) ? implode(',', $command->environment()) : $command->environment(), $command->getName(), '', '', '', '', '', '', $command->user()));
     return true;
 }