Updates the status of the task.
int $status: The new status of the task. Has to be one of the task status constants.
string $message: (Optional) The log message to be saved along with the status change.
array $variables: (Optional) An array of variables to replace in the message on display.
string $type: (optional) The message type.
int The updated status of the task if it could be set.
Job::addMessage()
public function setStatus($status, $message = NULL, $variables = array(), $type = 'debug');