Returns the id of the task associated with the current conversation or 'null'.
197906
public String getTaskId() {
    Task task = getTask();
    return task != null ? task.getId() : null;
  }
444984
def GetProcessedTaskByIdentifier(self, task_identifier):
    
    with self._lock:
      task = self._tasks_processing.get(task_identifier, None)
      if not task:
        task = self._tasks_queued.get(task_identifier, None)
      if not task:
        task = self._tasks_abandoned.get(task_identifier, None)
      if not task:
        raise KeyError('Status of task {0:s} is unknown'.format(
            task_identifier))

    return task
103176
def get_task_id(task, base_path_or_url):
    
    name = task.get('name')
    if base_path_or_url:
        if Util.is_url(base_path_or_url):
            name = urllib.parse.urljoin(base_path_or_url, name)
        else:
            name = os.path.normpath(os.path.join(os.path.dirname(base_path_or_url), name))
    task_id = [name,
               task.get('properties'),
               task.get('runset'),
               ]
    return tuple(task_id)
838556
public JSONObject getTaskStatus(int id, HashMap<String, String> options) {
        AipRequest request = new AipRequest();
        preOperation(request);
        
        request.addBody("id", id);
        if (options != null) {
            request.addBody(options);
        }
        request.setUri(KnowledgeGraphicConsts.TASK_STATUS);
        postOperation(request);
        return requestServer(request);
    }
896701
public Task getTask(String id) {
		final int index = ids.indexOf(id);
		if (index > -1) {
			return getTask(index);
		}
		return null;
	}
1193649
def get_chat_id(self):
        """"""
        chat_id = self.json_response.get("chatid", None)
        self.logger.info("%s\t%s" % (self.request_method, self.request_url))
        return chat_id
981273
def status(self):
        
        task_id = self.request.id
        try:
            # Most calls are for existing objects, don't waste time
            # preparing creation arguments unless necessary
            return UserTaskStatus.objects.get(task_id=task_id)
        except UserTaskStatus.DoesNotExist:
            # Probably an eager task that skipped the before_task_publish
            # signal (or an atomic view where the new record hasn't been
            # committed yet).  Create a record for it.
            arguments_dict = self.arguments_as_dict(*self.request.args, **self.request.kwargs)
            name = self.generate_name(arguments_dict)
            task_class = '.'.join([self.__class__.__module__, self.__class__.__name__])
            total_steps = self.calculate_total_steps(arguments_dict)
            user_id = arguments_dict['user_id']
            # Use get_or_create() again just in case another process created it in the meantime
            return UserTaskStatus.objects.get_or_create(
                task_id=task_id, defaults={'user_id': user_id, 'name': name, 'task_class': task_class,
                                           'total_steps': total_steps})[0]
1367342
def get_task_id(name, group = nil, klass = nil, status = nil)
      page_size = 100
      page = 0
      loop do
        tasks = find_tasks(limit: page_size, page: page, group: group, class: klass, status: status)
        tasks.each do |task|
          return task['id'].to_i if task['name'] =~ /#{name}/

          page += 1
        end
        break if tasks.size < page_size
      end
      nil
    end
847987
def task_log(self):
        
        if self.task_id is None:
            raise ValueError('task_id is None')
        return self.get_task_log(self.task_id, self.session, self.request_kwargs)
271727
Optional<PackingPlan.InstancePlan> getInstance(int taskId) {
    for (PackingPlan.InstancePlan instancePlan : this.instances) {
      if (instancePlan.getTaskId() == taskId) {
        return Optional.of(instancePlan);
      }
    }
    return Optional.absent();
  }
689196
public static String getTaskLogsUrl(JobHistory.TaskAttempt attempt) {
    if (attempt.get(Keys.HTTP_PORT).equals("")
        || attempt.get(Keys.TRACKER_NAME).equals("")
        || attempt.get(Keys.TASK_ATTEMPT_ID).equals("")) {
      return null;
    }

    String taskTrackerName =
      JobInProgress.convertTrackerNameToHostName(
        attempt.get(Keys.TRACKER_NAME));
    return TaskLogServlet.getTaskLogUrl(taskTrackerName, attempt
        .get(Keys.HTTP_PORT), attempt.get(Keys.TASK_ATTEMPT_ID));
  }
242716
def _next_id(self):
        """"""
        assert get_thread_ident() == self.ioloop_thread_id
        self._last_msg_id += 1
        return str(self._last_msg_id)
688505
public String getMessageId() {
        return (data != null && data.payload != null) ? data.payload.messageId : null;
    }
1343795
private static TaskEntity getTask(final int taskId, final Collection<TaskEntity> tasks) {
    for (final TaskEntity task : tasks) {
      if (taskId == task.getId()) {
        return task;
      }
    }
    return null;
  }
557681
def get_message_id(self):
        """"""
        message_id = self.json_response.get("messageId", None)
        self.logger.info("%s\t%s" % (self.request_method, self.request_url))
        return message_id
211863
@Override
	public Task findTask(Long taskId) {
		check();
		Task task = null;
		if( this.pessimisticLocking ) {
			return this.em.find( TaskImpl.class, taskId, lockMode );
        }
		task = this.em.find( TaskImpl.class, taskId );
		return task;
	}
206335
def CheckTaskToMerge(self, task):
    
    with self._lock:
      is_abandoned = task.identifier in self._tasks_abandoned
      is_processing = task.identifier in self._tasks_processing
      is_queued = task.identifier in self._tasks_queued

      if not is_queued and not is_processing and not is_abandoned:
        raise KeyError('Status of task {0:s} is unknown.'.format(
            task.identifier))

      return is_queued or is_processing or is_abandoned and not task.has_retry