Finds one specific task.

        Args:
            task_uuid (str): the task id
14339
def task(self, task_uuid):
        
        request = clearly_pb2.FindTaskRequest(task_uuid=task_uuid)
        task = self._stub.find_task(request)
        if task.uuid:
            ClearlyClient._display_task(task, True, True, True)
        else:
            print(EMPTY)
145522
def task_start(self, **kw):
        

        id, task = self.get_task(**kw)

        self._execute(id, 'start')
        return self.get_task(uuid=task['uuid'])[1]
1359993
def get_link(self, task_id):
        
        links = [x for x in self.links if x.task_id == task_id]
        if len(links) != 1:
            raise CoTError("No single Link matches task_id {}!\n{}".format(task_id, self.dependent_task_ids()))
        return links[0]
976736
def task_add(self, description, tags=None, **kw):
        

        task = self._stub_task(description, tags, **kw)

        task['status'] = Status.PENDING

        # TODO -- check only valid keywords

        if not 'entry' in task:
            task['entry'] = str(int(time.time()))

        if not 'uuid' in task:
            task['uuid'] = str(uuid.uuid4())

        id = self._task_add(task, Status.PENDING)
        task['id'] = id
        return task
1013324
def get(self, **kwargs):
        
        clone = self.filter(**kwargs)
        num = len(clone)
        if num == 1:
            return clone._result_cache[0]
        if not num:
            raise Task.DoesNotExist(
                'Task matching query does not exist. '
                'Lookup parameters were {0}'.format(kwargs),
            )
        raise ValueError(
            'get() returned more than one Task -- it returned {0}! '
            'Lookup parameters were {1}'.format(num, kwargs),
        )
1098236
def find_by_uuid(self, uuid):
        
        for entry in self.entries:
            if entry.uuid == uuid:
                return entry
        raise EntryNotFoundError("Entry not found for uuid: %s" % uuid)
319155
def find_by_id(self, task, params={}, **options): 
        
        path = "/tasks/%s" % (task)
        return self.client.get(path, params, **options)
42385
def get_task_indicator(self, task_level=None):
        
        if task_level is None:
            task_level = len(self.tasks)
        return self.TASK_INDICATORS[task_level % len(self.TASK_INDICATORS)]
1305784
def _assign_uid(self, sid):
        
        self._uid = ru.generate_id(
            'task.%(item_counter)04d', ru.ID_CUSTOM, namespace=sid)
961940
def get_task(task_id, completed=True):
    
    tasks = get_tasks(task_id=task_id, completed=completed)

    if len(tasks) == 0:
        return None

    assert len(tasks) == 1, 'get_task should return at max 1 task for a task id'
    return tasks[0]
666542
public static function taskGet($task_id)
    {
        $tasks = self::taskFileLoad();
        if (isset($tasks[$task_id])) {
            return $tasks[$task_id];
        }
        return false;
    }
14693
def find_task_by_id(self, id, session=None):
        
        with self._session(session) as session:
            return session.query(TaskRecord).get(id)
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)
751945
def _find_batch_containing_event(self, uuid):
        
        if self.estore.key_exists(uuid):
            # Reusing already opened DB if possible
            return self.batchno
        else:
            for batchno in range(self.batchno - 1, -1, -1):
                # Iterating backwards here because we are more likely to find
                # the event in an later archive, than earlier.
                db = self._open_event_store(batchno)
                with contextlib.closing(db):
                    if db.key_exists(uuid):
                        return batchno
        return None
857907
def get_task_cache(self, username, courseid, taskid):
        
        return self.get_task_caches([username], courseid, taskid)[username]
107839
def task_add(self, description, tags=None, **kw):
        
        task = self._stub_task(description, tags, **kw)

        # Check if there are annotations, if so remove them from the
        # task and add them after we've added the task.
        annotations = self._extract_annotations_from_task(task)

        # With older versions of taskwarrior, you can specify whatever uuid you
        # want when adding a task.
        if self.get_version() < LooseVersion('2.4'):
            task['uuid'] = str(uuid.uuid4())
        elif 'uuid' in task:
            del task['uuid']

        if self._marshal:
            args = taskw.utils.encode_task_experimental(task.serialized())
        else:
            args = taskw.utils.encode_task_experimental(task)

        stdout, stderr = self._execute('add', *args)

        # However, in 2.4 and later, you cannot specify whatever uuid you want
        # when adding a task.  Instead, you have to specify rc.verbose=new-uuid
        # and then parse the assigned uuid out from stdout.
        if self.get_version() >= LooseVersion('2.4'):
            task['uuid'] = stdout.strip().split()[-1].strip('.')

        id, added_task = self.get_task(uuid=task['uuid'])

        # Check if 'uuid' is in the task we just added.
        if not 'uuid' in added_task:
            raise KeyError(
                'Error encountered while creating task;'
                'STDOUT: %s; STDERR: %s' % (
                    stdout,
                    stderr,
                )
            )

        if annotations and 'uuid' in added_task:
            for annotation in annotations:
                self.task_annotate(added_task, annotation)

        id, added_task = self.get_task(uuid=added_task[six.u('uuid')])
        return added_task
258207
def do_where(self, taskid: int) -> None:
        """"""
        task = task_by_id(taskid, self._loop)
        if task:
            self._sout.write(_format_stack(task))
            self._sout.write('\n')
        else:
            self._sout.write('No task %d\n' % taskid)