Example #1
0
 public function stopAction()
 {
     $this->_checkCanEdit();
     $pid = Request::post('pid', 'integer', 0);
     if (!$pid) {
         Response::jsonError($this->_lang->WRONG_REQUEST);
     }
     if ($this->_tManager->signal($pid, Bgtask_Abstract::SIGNAL_STOP)) {
         Response::jsonSuccess();
     } else {
         Response::jsonError($this->_lang->CANT_EXEC);
     }
 }