Esempio n. 1
0
 public function execute()
 {
     if ($this->getQueue()->getStatus() == REPORT_QUEUE_CRASHED) {
         $this->status_id = REPORT_QUEUE_CANCELLED;
         $this->save();
         return;
     }
     try {
         $this->exec_start = M('Date')->dbDateTime();
         $this->status_id = REPORT_QUEUE_PROCESSING;
         $this->save();
         $time = microtime(true);
         $this->_mapper->getExecuter($this->executer)->execute($this->body);
         $time = sprintf('%.5f', microtime(true) - $time);
         $this->exec_time = $time;
         $this->status_id = REPORT_QUEUE_COMPLETE;
     } catch (Exception $e) {
         $this->status_id = REPORT_QUEUE_CRASHED;
         $this->error_message = $e->getMessage();
     }
     $this->save();
 }
Esempio n. 2
0
 /**
  * Executes command
  *
  */
 public function execute()
 {
     $this->prepare();
     $this->_mapper->getExecuter($this->_script->executer)->execute($this->_body);
 }