Returns the current status of a task

@param integer $taskId
@return string
977246
public function getStatusOfTaskWithId($taskId)
    {
        $task = $this->taskRepo->find($taskId);
        if (!($task instanceof Task)) {
            //the task was not found
            return Task::STATUS_GONE;
        }
        return $task->getStatus();
    }
525753
public function getTasksToRun($force = false, $task_name = null) 
	{
		$res = array();
		
		$sql = 
			'SELECT majat_name, majat_status, majat_last_run, majat_last_result, majat_frequency, majat_nb_occur, majat_running
			FROM `##maj_admintasks`
			WHERE majat_status = :status
			AND (majat_running = :is_running OR DATE_ADD(majat_last_run, INTERVAL :time_out SECOND) <= NOW())';
		
		$args = array(
			'status' => 'enabled',
			'is_running' => 0,
			'time_out' => AbstractTask::TASK_TIME_OUT		
		);
		
		if(!$force) {
			$sql .= ' AND (DATE_ADD(majat_last_run, INTERVAL majat_frequency MINUTE) <= NOW() OR majat_last_result = 0)';
		}
		
		if($task_name) {
			$sql .= ' AND majat_name = :task_name';
			$args['task_name'] = $task_name;
		}
		
		$data = Database::prepare($sql)->execute($args)->fetchAll(\PDO::FETCH_ASSOC);
		
		foreach($data as $task_row) {
            $task = $this->loadTaskFromRow($task_row);
			if($task)
			{
				$res[] = $task;
			} 
        }
		
		return $res;	
	}
1032647
public function getTask(int $taskId)
    {
        if ( ! $this->validateId($taskId)) {
            return false;
        }

        $result = $this->get('tasks/' . $taskId);

        $status = $result->getStatusCode();
        if (200 === $status) {
            return json_decode($result->getBody()->getContents());
        }

        return false;
    }
275430
public function getStatus() : ?string 
    {
        if ( ! $this->hasStatus()) {
            $this->setStatus($this->getDefaultStatus());
        }
        return $this->status;
    }
1165470
public function status(array $task) {
		$name = static::$statuses[$task['status']]['name'];
		return $this->_isCli ? $name : $this->Html->tag('span', $name, array('class' => 'label ' . static::$statuses[$task['status']]['class']));
	}
203742
def task_status(self, task_id):
        """"""
        data = {
            'task_ids': task_id,
        }
        return self._perform_post_request(self.task_status_endpoint, data, self.token_header)
513278
public function getSendAllStatus($messageId)
    {
        $result = $this->httpRaw(self::WECHAT_SEND_ALL_STATUS, [
            'msgid' => $messageId
        ], [
            'access_token' => $this->getAccessToken()
        ]);
        return isset($result['msg_status']) ? $result : false;
    }
341994
public function status($transactionId)
    {
        $xml = new DOMDocument();
        $transaction = $xml->createElement('hps:Transaction');
        $status = $xml->createElement('hps:GetTransactionStatus');

        $status->appendChild($xml->createElement('hps:GatewayTxnId', $transactionId));

        $transaction->appendChild($status);
        return $this->_submitTransaction($transaction, 'GetTransactionStatus');
    }
1104050
private function getAnnotation($taskId)
    {
        $task = $this->container->get($taskId);

        $reflectionObject = new \ReflectionObject($task);
        $annotation = $this->reader->getClassAnnotation($reflectionObject, self::ANNOTATION_CLASS);

        $this->guardAgainstInvalidAnnotation($annotation, $task);

        return $annotation;
    }
1161689
public function getStatus()
    {
        try {
            if (!$this->hasRequestParameter(self::TASK_ID_PARAM)) {
                throw new \common_exception_MissingParameter(self::TASK_ID_PARAM, $this->getRequestURI());
            }

            /** @var TaskLogInterface $taskLogService */
            $taskLogService = $this->getServiceLocator()->get(TaskLogInterface::SERVICE_ID);

            $entity = $taskLogService->getById((string) $this->getRequestParameter(self::TASK_ID_PARAM));

            $this->returnSuccess((string) $entity->getStatus());
        } catch (\Exception $e) {
            $this->returnFailure($e);
        }
    }
106573
@Override
    public <T> TaskStatus<T> getStatus(long taskId) {
        String owner = getOwner();
        if (owner == null)
            return null;

        TransactionController tranController = new TransactionController();
        TaskRecord taskRecord = null;
        try {
            tranController.preInvoke();
            taskRecord = taskStore.findById(taskId, owner, false);
        } catch (Throwable x) {
            tranController.setFailure(x);
        } finally {
            PersistentStoreException x = tranController.postInvoke(PersistentStoreException.class); // TODO proposed spec class
            if (x != null)
                throw x;
        }

        return taskRecord == null ? null : new TaskStatusImpl<T>(taskRecord, this);
    }
847882
public function getStatus($id)
    {
        if ($this->isSuccess()) {
            foreach ($this->getResult() as $row) {
                if ($row['id'] == $id) {
                    return $row['status'];
                }
            }
        }

        return false;
    }
647962
protected function getTask($taskId)
    {
        if (!isset($this->tasks[$taskId])) {
            /** @var Queue $taskQueue */
            $taskQueue = $this->getServiceManager()->get(Queue::SERVICE_ID);
            $task = $taskQueue->getTask($taskId);
            if ($task === null) {
                throw new \common_exception_NotFound(__('Task not found'));
            }
            $this->tasks[$taskId] = $task;
        }
        return $this->tasks[$taskId];
    }
666542
public static function taskGet($task_id)
    {
        $tasks = self::taskFileLoad();
        if (isset($tasks[$task_id])) {
            return $tasks[$task_id];
        }
        return false;
    }
785107
public function writeProgress($taskId, Progress $progress)
    {
        return $this->write($taskId, [
            'progress_percent'      => $progress->percent,
            'progress_step'         => $progress->step,
            'progress_name'         => $progress->stepName,
            'progress_steps'        => $progress->totalSteps,
            'progress_remaining'    => $progress->leftOverSeconds
        ]);
    }
535061
public function getProjectTasks($projectId = null)
    {
        $projectId = $projectId ?: $this->defaultProjectId;

        return $this->curl->get("tasks?project={$projectId}");
    }
434388
public function getTask($taskId)
    {


        if ($taskId == '')
            throw new Exception('Task ID not specified');

        //build URI
        $strURI = Product::$baseProductUri . '/tasks/' . $this->getFileName() . '/tasks/' . $taskId;

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        if ($json->Code == 200)
            return $json->Task;
        else
            return false;
    }