protected function _taskProcessing($grantTasks) { $objModel = new \Daemon\Models\Demo($this->_objAha); $grantRet = (yield $objModel->lockTask($grantTasks, $this->_worker->pid)); if (false === $grantRet) { (yield false); } else { $ret = (yield $this->_sendGrantTasks($grantTasks)); (yield $ret); } }
protected function _doTask($package) { $objModel = new \Daemon\Models\Demo($this->_objAha); $grantRet = (yield $objModel->doTask($package)); if (false === $grantRet) { Log::redoLog()->debug(array('redo' => $package)); } $arrResponse = array('cmd' => Constant::PACKAGE_TYPE_COMPLETE, 'content' => array('pid' => $this->_worker->pid)); $this->_send($arrResponse); (yield AHA_DECLINED); }