Retrieves execution details for a task.
        :return: Execution details instance.
514909
def get_execution_details(self):
        
        extra = {
            'resource': self.__class__.__name__,
            'query': {'id': self.id}
        }
        logger.info('Get execution details', extra=extra)
        data = self._api.get(
            self._URL['execution_details'].format(id=self.id)).json()
        return ExecutionDetails(api=self._api, **data)
140725
def fetch_task_output(self):
        
        # 
        if os.path.isfile(os.path.join(self.tmp_dir, "job.out")):
            with open(os.path.join(self.tmp_dir, "job.out"), "r") as f_out:
                outputs = f_out.readlines()
        else:
            outputs = ''
        return outputs
1080418
def results
      return self.get_jobs.map do |task|
        next if task == nil
        next if task.server == nil
        {
          :job_id => task.job_id,
          :name   => task.info[0],
          :host   => task.server.name,
          :status => task.status,
          :error  => task.error,
          :total  => self.get_total_execution_time(task.status, task.time_start, task.time_end),
          :start  => task.time_start,
          :end    => task.time_end,
          :worker => task
        }
      end
    end
1144368
def tasks(self):
        
        task_input = {'taskName': 'QueryTaskCatalog'}
        output = taskengine.execute(task_input, self._engine_name, cwd=self._cwd)
        return output['outputParameters']['TASKS']
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)
1055739
def view_task_info(token, dstore):
    
    args = token.split(':')[1:]  # called as task_info:task_name
    if args:
        [task] = args
        array = dstore['task_info/' + task].value
        rduration = array['duration'] / array['weight']
        data = util.compose_arrays(rduration, array, 'rduration')
        data.sort(order='duration')
        return rst_table(data)

    data = ['operation-duration mean stddev min max outputs'.split()]
    for task in dstore['task_info']:
        val = dstore['task_info/' + task]['duration']
        if len(val):
            data.append(stats(task, val))
    if len(data) == 1:
        return 'Not available'
    return rst_table(data)
1156866
def n_executions(self):
        
        pipeline = self.tiger.connection.pipeline()
        pipeline.exists(self.tiger._key('task', self.id))
        pipeline.llen(self.tiger._key('task', self.id, 'executions'))
        exists, n_executions = pipeline.execute()
        if not exists:
            raise TaskNotFound('Task {} not found.'.format(
                self.id
            ))
        return n_executions
557015
def _log_task_info(headers, extra_task_info=None):
    """"""
    ran_at = time.time()
    task_eta = float(headers.get('X-Appengine-Tasketa', 0.0))
    task_info = {
        'retry_count': headers.get('X-Appengine-Taskretrycount', ''),
        'execution_count': headers.get('X-Appengine-Taskexecutioncount', ''),
        'task_eta': task_eta,
        'ran': ran_at,
        'gae_latency_seconds': ran_at - task_eta
    }

    if extra_task_info:
        task_info['extra'] = extra_task_info

    logging.debug('TASK-INFO: %s', json.dumps(task_info))
1000323
def executions(self) -> List[Execution]:
        
        return list(fill.execution for fill in self.wrapper.fills.values())
437763
def workflow_get_details(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/getDetails' % object_id, input_params, always_retry=always_retry, **kwargs)
265549
def log_detail(job_id=None, task_name=None, log_id=None):
        
        jobs = get_jobs()
        job = [job for job in jobs if str(job['job_id']) == job_id][0]
        return render_template('log_detail.html',
                               job=job,
                               task_name=task_name,
                               task=[task for task in job['tasks']
                                     if task['name'] == task_name][0],
                               log_id=log_id)
1114394
def get_cpu_info(self) -> str:
        ''''''
        output, _ = self._execute(
            '-s', self.device_sn, 'shell', 'cat', '/proc/cpuinfo')
        return output
1335054
def _get_and_execute(self):
        
        try:
            work = self.queue.get(timeout=self.max_seconds_idle)
        except queue.Empty:
            # max_seconds_idle has been exhausted, exiting
            self.end_notify()
            return False
        else:
            self._work(work)
            self.queue.task_done()
            return True
338072
def get_run_params(self) -> Dict:
        """"""
        params = {}
        if self.celery_queue:
            params['queue'] = self.celery_queue

        if self.timeout:
            params['soft_time_limit'] = self.timeout
            # We set also a hard time limit that will send sig 9
            # This hard time limit should not happened, as it will set inconsistent state
            params['time_limit'] = self.timeout + settings.CELERY_HARD_TIME_LIMIT_DELAY

        if self.execute_at:
            params['eta'] = self.execute_at

        return params
397034
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return ExecutionStepContextInstance(
            self._version,
            payload,
            flow_sid=self._solution['flow_sid'],
            execution_sid=self._solution['execution_sid'],
            step_sid=self._solution['step_sid'],
        )
1233972
def system_describe_executions(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/describeExecutions', input_params, always_retry=always_retry, **kwargs)
165933
def get_task_history(last_task):
    """"""
    if hasattr(last_task, 'branch') and last_task.branch:
        return
    elif hasattr(last_task, 'hide') and last_task.hide:
        return
    else:
        return get_func_info(last_task)