public function setExecutionStatusForTask($execution_status, Dunagan_ProcessQueue_Model_Task_Interface $taskObject, $status_message = null) { $task_id = $taskObject->getId(); if (empty($task_id)) { // TODO Some logging here return 0; } if ($taskObject->isStatusValid($execution_status)) { $update_bind_array = array('status' => $execution_status); if (!is_null($status_message)) { $update_bind_array['status_message'] = $status_message; } $task_id = $taskObject->getId(); $where_conditions_array = array('task_id=?' => $task_id); $rows_updated = $this->_getWriteAdapter()->update($this->getMainTable(), $update_bind_array, $where_conditions_array); return $rows_updated; } // TODO Log error in this case return 0; }