Пример #1
0
 /**
  * Delete a job
  */
 public function deleteAction()
 {
     $server = $this->_getParam("server");
     $jobId = $this->_getParam("id");
     try {
         // Connect to the server
         $messageQueue = new Pheanstalk_Pheanstalk($server);
         $job = $messageQueue->peek($jobId);
         $messageQueue->delete($job);
         $response = "";
     } catch (Exception $e) {
         $this->getResponse()->setHttpResponseCode(500);
         $response = $e->getMessage();
     }
     // Send Json response
     $this->jsonHelper->sendJson($response);
     $this->jsonHelper->getResponse()->sendResponse();
 }