/** * Report processing task * * @param int $taskId * @return bool|Enterprise_Queue_Model_Worker_Reporter_Native */ public function reportTaskProcessing($taskId) { $this->_task->load($taskId); if ($this->_task->getStatus() == Enterprise_Queue_Model_Queue_Task::TASK_STATUS_SKIPPED) { return true; } $this->_task->setStatus(Enterprise_Queue_Model_Queue_Task::TASK_STATUS_IN_PROGRESS); $this->_task->save(); return $this; }
/** * Delete a message from the queue * * @param Zend_Queue_Message $message * @return bool */ public function deleteMessage(Zend_Queue_Message $message) { try { $msg = $this->_queueTaskModel->load($message->handle, 'handle'); if (!is_null($msg->getId())) { $msg->delete(); return true; } } catch (Exception $e) { $this->_logger->logException($e); } return false; }