Find task with the given record ID.
14693
def find_task_by_id(self, id, session=None):
        
        with self._session(session) as session:
            return session.query(TaskRecord).get(id)
333117
def task_id(self):
        
        if self['task_id']:
            return self['task_id']
        if self.extra and 'container_koji_task_id' in self.extra:
            return self.extra['container_koji_task_id']
797303
async def inspect(self, task_id: str) -> Mapping[str, Any]:
        

        response = await self.docker._query_json(
            "tasks/{task_id}".format(task_id=task_id), method="GET"
        )
        return response
1197158
private void checkForDeadTask(Tenant tenant, TaskRecord taskRecord) {
        Calendar lastReport = taskRecord.getTime(TaskRecord.PROP_PROGRESS_TIME);
        if (lastReport == null) {
            lastReport = taskRecord.getTime(TaskRecord.PROP_START_TIME);
            if (lastReport == null) {
                return; // corrupt/incomplete task record
            }
        }
        long minsSinceLastActivity = (System.currentTimeMillis() - lastReport.getTimeInMillis()) / (1000 * 60);
        if (isOurActiveTask(tenant, taskRecord.getTaskID())) {
            checkForHungTask(tenant, taskRecord, minsSinceLastActivity);
        } else {
            checkForAbandonedTask(tenant, taskRecord, minsSinceLastActivity);
        }
    }
1331982
private void readLeafTasks(Task parent, Integer id)
   {
      Integer currentID = id;
      Table table = getTable("A1TAB");
      while (currentID.intValue() != 0)
      {
         if (m_projectFile.getTaskByUniqueID(currentID) == null)
         {
            readTask(parent, currentID);
         }
         currentID = table.find(currentID).getInteger("NEXT_TASK_ID");
      }
   }
838019
def find(self, id, **kwargs):
        
        return self.find_by(values={self.primary_key: id}, **kwargs)
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
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)
1209931
def find_one_raw(self, resource, _id):
        """"""
        return self._find_by_id(resource=resource, _id=_id)
823238
def _get_task(name):
	''''''
	matches = [x for x in TASKS if x.match(name)]
	if matches:
		return matches[0]
249374
def find_task(self, request, context):
        """"""
        _log_request(request, context)
        task = self.listener.memory.tasks.get(request.task_uuid)
        if not task:
            return clearly_pb2.TaskMessage()
        return ClearlyServer._event_to_pb(task)[1]
675342
def findRecordItem(self, record, parent=None):
        
        try:
            item = self._recordMapping[record]()
        except KeyError:
            return None
        
        if item is None:
            self._recordMapping.pop(record)
        
        return item
411061
def get_task_subtasks(self, task_id, completed=False):
        '''  '''
        return subtasks_endpoint.get_task_subtasks(self, task_id, completed=completed)
109444
private TaskRecord waitForTaskStatus(Tenant tenant, Task task, Predicate<TaskStatus> pred) {
        TaskRecord taskRecord = null;
        while (true) {
            Iterator<DColumn> colIter =
                DBService.instance(tenant).getAllColumns(TaskManagerService.TASKS_STORE_NAME, task.getTaskID()).iterator();
            if (!colIter.hasNext()) {
                taskRecord = storeTaskRecord(tenant, task);
            } else {
                taskRecord = buildTaskRecord(task.getTaskID(), colIter);
            }
            if (pred.test(taskRecord.getStatus())) {
                break;
            }
            try { Thread.sleep(TASK_CHECK_MILLIS); } catch (InterruptedException e) { }
        };
        return taskRecord;
    }
1318639
def find_all_runs(self, session=None):
        
        with self._session(session) as session:
            return session.query(TaskRecord).all()
1320420
def lookup_task(self, task):
        
        if isinstance(task, str):
            try:
                return self[task]
            except KeyError:
                pass
        raise TaskError('Unknown task %s' % task)
378134
private AuditUtilityTask getTask(String taskName) {
        AuditUtilityTask task = null;
        for (AuditUtilityTask availTask : tasks) {
            if (availTask.getTaskName().equals(taskName)) {
                task = availTask;
            }
        }
        return task;
    }