Action to retrieve test import status from queue
497062
public function getStatus()
    {
        try {
            if (!$this->hasRequestParameter(self::TASK_ID_PARAM)) {
                throw new \common_exception_MissingParameter(self::TASK_ID_PARAM, $this->getRequestURI());
            }

            $data = $this->getTaskLogReturnData(
                $this->getRequestParameter(self::TASK_ID_PARAM),
                $this->getTaskName()
            );

            $this->returnSuccess($data);
        } catch (\Exception $e) {
            $this->returnFailure($e);
        }
    }
822351
def on_task_status(self, task):
        ''''''
        try:
            procesok = task['track']['process']['ok']
            if not self.projects[task['project']].task_queue.done(task['taskid']):
                logging.error('not processing pack: %(project)s:%(taskid)s %(url)s', task)
                return None
        except KeyError as e:
            logger.error("Bad status pack: %s", e)
            return None

        if procesok:
            ret = self.on_task_done(task)
        else:
            ret = self.on_task_failed(task)

        if task['track']['fetch'].get('time'):
            self._cnt['5m_time'].event((task['project'], 'fetch_time'),
                                       task['track']['fetch']['time'])
        if task['track']['process'].get('time'):
            self._cnt['5m_time'].event((task['project'], 'process_time'),
                                       task['track']['process'].get('time'))
        self.projects[task['project']].active_tasks.appendleft((time.time(), task))
        return ret
138446
def get_required_status_checks(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.protection_url + "/required_status_checks"
        )
        return github.RequiredStatusChecks.RequiredStatusChecks(self._requester, headers, data, completed=True)
853425
def check_task_status_and_id(task_json):
        
        if task_json.get('ImportImageTasks') is not None:
            task = task_json['ImportImageTasks'][0]
        else:
            task = task_json

        current_status = task['Status']
        image_id = task['ImportTaskId']
        if current_status == 'completed':
            print "The import has completed succesfully as ID: {}".format(image_id)
            return False, image_id
        elif current_status == 'deleting':
            print "The import job has been cancelled for some reason"
            return False, None
        elif current_status == 'deleted':
            print "The import job was cancelled"
            return False, None
        else:
            print "The current import job for id {} status is: {}".format(image_id, current_status)
            print "sleeping for 30 seconds"
            time.sleep(30)
            return True, image_id
706812
function status()
	{
		$this->filter = array('Property' => 'TaskResultID','SimpleOperator' => 'equals','Value' => $this->lastTaskID);
		$response = new ET_Get($this->authStub, 'ImportResultsSummary', array('ImportDefinitionCustomerKey','TaskResultID','ImportStatus','StartDate','EndDate','DestinationID','NumberSuccessful','NumberDuplicated','NumberErrors','TotalRows','ImportType'), $this->filter);
		$this->lastRequestID = $response->request_id;
		return $response;
	}
1260000
def status(commit, ignore: [])
      tree = get_object(commit.tree) unless commit.nil?

      Utils::Status.compare_tree_and_store tree,
                                           staging_area,
                                           object_store,
                                           ignore: ignore
    end
799380
def status(self, request, project, pk=None):
        
        try:
            push = Push.objects.get(id=pk)
        except Push.DoesNotExist:
            return Response("No push with id: {0}".format(pk),
                            status=HTTP_404_NOT_FOUND)
        return Response(push.get_status())
124713
def pull_status(self, param=None, must=[APIKEY]):
        '''
        '''
        param = {} if param is None else param
        r = self.verify_param(param, must)
        if not r.is_succ():
            return r
        h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[FLOW_STATUS] if FLOW_STATUS in rsp else None, VERSION_V2:rsp}[self.version()])
        return self.path('pull_status.json').post(param, h, r)
174532
def run(self) -> None:
        
        while not self.cleanup:
            try:
                result, test, additional_info = self.result_queue.get(timeout=1)
            except queue.Empty:
                continue

            self.result_queue.task_done()

            if result == TestState.serialization_failure:
                test = self.tests[test]
                warnings.warn("Serialization error: {} on test {}".format(
                    additional_info, test), SerializationWarning)
                test(self)

            else:
                self.testsRun += 1

                if result == TestState.success:
                    self.addSuccess(test)
                elif result == TestState.failure:
                    self.addFailure(test, additional_info)
                elif result == TestState.error:
                    self.addError(test, additional_info)
                elif result == TestState.skipped:
                    self.addSkip(test, additional_info)
                elif result == TestState.expected_failure:
                    self.addExpectedFailure(test, additional_info)
                elif result == TestState.unexpected_success:
                    self.addUnexpectedSuccess(test)
                else:
                    raise Exception("This is not a valid test type :", result)
563866
function (test) {
        if (test.iteration >= test.cfg.repeat) {
            return completeTest(test);
        }
        test.iteration += 1;

        test.cfg.action.call(null, test.name, test.iteration - 1, generateTestCallback(test, this));
    }
823489
def _check_status(status):
    """"""
    if status != constants.STATUS_SUCCESS:
        exception = STATUS_TO_EXCEPTION.get(status, CairoError)
        status_name = ffi.string(ffi.cast("cairo_status_t", status))
        message = 'cairo returned %s: %s' % (
            status_name, ffi.string(cairo.cairo_status_to_string(status)))
        raise exception(message, status)
242115
def _check_status(self):
        """"""
        logger.info('Checking repo status')
        status = self.log_call(
            ['git', 'status', '--porcelain'],
            callwith=subprocess.check_output,
            cwd=self.cwd,
        )
        if status:
            raise DirtyException(status)
1259286
async function getBranchStatusCheck(branchName, context) {
  logger.debug(`getBranchStatusCheck(${branchName}, context=${context})`);

  const branchCommit = await config.storage.getBranchCommit(branchName);

  try {
    const states = await utils.accumulateValues(
      `./rest/build-status/1.0/commits/${branchCommit}`
    );

    for (const state of states) {
      if (state.key === context) {
        switch (state.state) {
          case 'SUCCESSFUL':
            return 'success';
          case 'INPROGRESS':
            return 'pending';
          case 'FAILED':
          default:
            return 'failure';
        }
      }
    }
  } catch (err) {
    logger.warn({ err }, `Failed to check branch status`);
  }
  return null;
}
306941
void commitStatus(Runnable closure) {
        GhprbSimpleStatusContext context = new GhprbSimpleStatusContext();
        ContextExtensionPoint.executeInContext(closure, context);

        extensions.add(new GhprbSimpleStatus(
                context.showMatrixStatus,
                context.context,
                context.statusUrl,
                context.triggeredStatus,
                context.startedStatus,
                context.addTestResults,
                context.completedStatus
        ));
    }
18053
def task_status(request, task_id):
    """"""
    result = AsyncResult(task_id)
    state, retval = result.state, result.result
    response_data = {'id': task_id, 'status': state, 'result': retval}
    if state in states.EXCEPTION_STATES:
        traceback = result.traceback
        response_data.update({'result': safe_repr(retval),
                              'exc': get_full_cls_name(retval.__class__),
                              'traceback': traceback})
    return JsonResponse({'task': response_data})
817945
def _handle_api_result(result: Optional[Dict[str, Any]]) -> Any:
    
    if isinstance(result, dict):
        if result.get('status') == 'failed':
            raise ActionFailed(retcode=result.get('retcode'))
        return result.get('data')
723779
def service_status(self, name):
        

        return self._loop.run_coroutine(self._client.service_status(name))