Check status of the service
163834
function checkStatus() {
  return server.ping(this, function(err, res) {
    if (err) {
      return out.error("error occurred: %j", err);
    }
    if (res.running) {
      return out.success("service running");
    }
    return out.error("service not running");
  });
}
492897
def device_status(self):
        """"""
        try:
            return self.device_status_simple(
                self.data.get('status').get('status1'))
        except (KeyError, AttributeError):
            return self.device_status_simple('')
965403
def status(name, sig=None):
    '''
    
    '''
    cmd = 's6-svstat {0}'.format(_service_path(name))
    out = __salt__['cmd.run_stdout'](cmd)
    try:
        pid = re.search(r'up \(pid (\d+)\)', out).group(1)
    except AttributeError:
        pid = ''
    return pid
505800
def status(self):
        
        orig_dict = self._get(self._service_url('status'))
        orig_dict['implementation_version'] = orig_dict.pop('Implementation-Version')
        orig_dict['built_from_git_sha1'] = orig_dict.pop('Built-From-Git-SHA1')
        return Status(orig_dict)
1250332
def status(self):
        
        data = self._read()
        self._status = YubiKeyUSBHIDStatus(data)
        return self._status
391823
def _get_status(self):
        """"""
        if self._state in ["processed", "error"]:
            return self._state
        
        get_resp = requests.get(self.location, cookies={"session": self.session})

        self._state = get_resp.json()["status"]
        self.slice_time = get_resp.json()["slice_time"]
        
        return self._state
569490
def check_status(self, status):
        ''''''
        if status == 'ZERO_RESULTS':
            raise GoogleServiceResultError(
                'The Google service was successful but returned no results.')
                
        elif status == 'OVER_QUERY_LIMIT':
            raise GoogleServiceResultError(
                'The given key has gone over the requests limit in the 24'
                ' hour period or has submitted too many requests in too'
                ' short a period of time.')
                
        elif status == 'REQUEST_DENIED':
            raise GoogleServiceResultError(
                'Your request was denied, probably because of lack of a'
                ' sensor parameter.')
                
        elif status == 'INVALID_REQUEST':
            raise GoogleServiceResultError('Probably missing address or latlng.')
            
        else:
            raise GoogleServiceResultError('Unkown error.')
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)
1038072
def get_status(self):
        """"""
        return {
            "host": self.__hostid,
            "status": self._service_status_announced,
            "statustext": CommonService.human_readable_state.get(
                self._service_status_announced
            ),
            "service": self._service_name,
            "serviceclass": self._service_class_name,
            "utilization": self._utilization.report(),
            "workflows": workflows.version(),
        }
1318506
def status(self, name=''):
        
        logger.warn(
            'Note that `status` is currently not so robust and may break on '
            'different systems')
        init = self._get_implementation(name)
        if name:
            self._assert_service_installed(init, name)
        logger.info('Retrieving status...')
        return init.status(name)
685784
def status(self, event):
        """"""
        result = AsyncResult(str(event.id))
        return (
            self.CELERY_STATES_TO_HTTP.get(result.state),
            result.info.get('message')
            if result.state in self.CELERY_RESULT_INFO_FOR and result.info
            else event.response.get('message')
        )
258794
def device_status(self):
        """"""
        return {
            'active': self.device['active'],
            'offline': self.device['offline'],
            'last_update': self.last_update,
            'battery_level': self.battery_level,
        }
1941
def status(self):
		

		if self.paid:
			return self.STATUS_PAID
		if self.forgiven:
			return self.STATUS_FORGIVEN
		if self.closed:
			return self.STATUS_CLOSED
		return self.STATUS_OPEN
803413
def status(self):
        
        if not self.created:
            return None
        self.inner().reload()
        return self.inner().status
991514
def get_current_status(self):
        """"""
        url = get_url("/remote/status.json")
        params = {"oauth": self._oauth_token, "csrf": self._csrf_token}
        r = self._request(url=url, params=params)
        return r.json()
1264729
def check_service(self):
        """"""
        try:
            service = yield Service.get(self.service_id)
        except couch.NotFound:
            raise exceptions.ValidationError('Service {} not found'
                                             .format(self.service_id))

        if service.service_type != 'repository':
            raise exceptions.ValidationError('{} is not a repository service'
                                             .format(self.service_id))

        if service.state != State.approved:
            raise exceptions.ValidationError('{} is not an approved service'
                                             .format(self.service_id))
71630
def status(self):
        """"""
        try:
            # -- Check client
            res = self.run(['info'])
            if res[0]['clientName'] == '*unknown*':
                return ConnectionStatus.INVALID_CLIENT
            # -- Trigger an auth error if not logged in
            self.run(['user', '-o'])
        except errors.CommandError as err:
            if 'password (P4PASSWD) invalid or unset' in str(err.args[0]):
                return ConnectionStatus.NO_AUTH
            if 'Connect to server failed' in str(err.args[0]):
                return ConnectionStatus.OFFLINE

        return ConnectionStatus.OK