{@inheritDoc}
@see \MyArtJaub\Webtrees\Module\AdminTasks\Model\TaskProviderInterface::setTaskStatus()
422981
public function setTaskStatus(AbstractTask $task, $status) {
        Database::prepare(
            'UPDATE `##maj_admintasks`'.
            ' SET majat_status = :status'.
            ' WHERE majat_name = :name'
        )->execute(array(
                'name' => $task->getName(),
				'status' => $status ? 'enabled' : 'disabled'
        ));
    }
395686
public function execute(AbstractTask $task, $parameters = array()) {

        $this->task = $task;

        $this->loadHtml($this->obtainHtml($parameters));

        $ignore_rules = $task->getIgnoreRules();

        foreach ($ignore_rules as $rule) {
            $this->useIgnoreRule($rule);
        }

        $class = $task->getClassName();

        $entity = new $class;

        $task->setEntity($entity);

        $rules = $task->getParseRules();

        foreach ($rules as $rule) {
            $this->useParseRule($rule, $entity);
        }
        return $entity;
    }
202690
@Override
	public void setStatusText(String status) {
		if (status != null)
			oldStatusText = task.getStatusText(0);
		else
			status = oldStatusText;
		task.setStatusText(status);
	}
398528
public synchronized void addTask(int taskId) {
    Preconditions.checkArgument(!mTaskIdToInfo.containsKey(taskId), "");
    mTaskIdToInfo.put(taskId, new TaskInfo().setJobId(mId).setTaskId(taskId)
        .setStatus(Status.CREATED).setErrorMessage("").setResult(null));
  }
638407
synchronized void setHealthStatus(TaskTrackerHealthStatus healthStatus) {
    healthStatus.setNodeHealthy(this.isHealthy());
    healthStatus.setHealthReport(this.getHealthReport());
    healthStatus.setLastReported(this.getLastReportedTime());
  }
637592
public function setStatus($status=null)
    {

        $presence = new \sb\XMPP\Presence();
        $presence->setStatus(is_string($status) ? $status : $this->status);

        $this->sendPresence($presence);
    }
392254
public function defineTask($taskName, $baseTask, $options)
    {
        $this->tasks['defined'][$taskName] = [
            'task' => $baseTask,
            'options' => $options
        ];
        return $this;
    }
542654
private void setTaskFailed(String reason) {
        m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID);
        m_taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, Long.toString(System.currentTimeMillis()));
        m_taskRecord.setProperty(TaskRecord.PROP_FAIL_REASON, reason);
        m_taskRecord.setStatus(TaskStatus.FAILED);
        TaskManagerService.instance().updateTaskStatus(m_tenant, m_taskRecord, true);
    }
1364929
public function regenerateTask($id)
    {
        $taskEntity = $this->taskRepo->find($id);
        if (!($taskEntity instanceof Task)) {
            throw new TaskQueueServiceException("No such task :" . $id, 1);
        }
        if ($taskEntity->getStatus() != Task::STATUS_FAILED) {
            throw new TaskQueueServiceException(
                "Invalid status for task. Current status: '" .
                $taskEntity->getStatus() .
                "' must be 'failed' to be able to restart it",
                1
            );
        }
        $data = $taskEntity->getData();
        $taskEntity->setStatus(Task::STATUS_RESTARTED);
        $this->entityManager->flush();
        $parts = explode("::", $data, 2);
        $taskObject = $this->serializer->deserialize($parts[1], $parts[0], 'json');
        $taskObject->setTaskIdentifier($taskEntity->getId());
        $data = get_class($taskObject) . '::' . $this->serializer->serialize($taskObject, 'json');
        $this->beanstalk
            ->useTube($taskEntity->getTube())
            ->put($data);
        return true;
    }
783228
public function runTask($taskId, $context = array())
    {
        $param =  array(
            'actionName' => 'runTask',
            'authPass'   => $this->getConfig('password'),
            'authUser'   => $this->getConfig('login'),
            'taskId'     => $taskId,
            'mode'       => 'synchronous'
        );

        if ($this->getConfig('context') != '' && is_array($this->getConfig('context'))) {
            $context = array_merge($this->getConfig('context'), $context);
        }

        if (!empty($context) && is_array($context)) {
            $param['context'] = $context;
        }

        return $this->getContent($this->doRequest($this->get('?'. $this->getJsonEncoded($param))));
    }
491518
public function updateTaskStatus($taskId, $status)
    {
        if ($this->getPersistence()->has($taskId)) {
            $this->getPersistence()->update($taskId , $status);
        }
        return $this;
    }
696858
private void setTaskStart() {
        m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID);
        m_taskRecord.setProperty(TaskRecord.PROP_START_TIME, Long.toString(System.currentTimeMillis()));
        m_taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, null);
        m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS, null);
        m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS_TIME, null);
        m_taskRecord.setProperty(TaskRecord.PROP_FAIL_REASON, null);
        m_taskRecord.setStatus(TaskStatus.IN_PROGRESS);
        TaskManagerService.instance().updateTaskStatus(m_tenant, m_taskRecord, false);
    }
1054712
public function addTask(Task $task): Task
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use create() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->create($task);
    }
445653
public function startTask($task, array $options = [])
    {
        ob_start() && $this->taskStack[] = $task;

        $this->taskOptions[$task] = $this->mergeDefaultOptions($options);
    }
44915
public void setTasks(java.util.Collection<TaskListEntry> tasks) {
        if (tasks == null) {
            this.tasks = null;
            return;
        }

        this.tasks = new java.util.ArrayList<TaskListEntry>(tasks);
    }
1180599
private void setTaskFinish() {
        m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID);
        m_taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, Long.toString(System.currentTimeMillis()));
        m_taskRecord.setStatus(TaskStatus.COMPLETED);
        TaskManagerService.instance().updateTaskStatus(m_tenant, m_taskRecord, true);
    }
1157559
public function updateTask(Task $task): Task
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use update() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->update($task);
    }