Checks the status of your CyREST server.
769402
def status(self, verbose=False):
        
        try:
            response=api(url=self.__url, method="GET", verbose=verbose)
        except Exception as e:
            print('Could not get status from CyREST:\n\n' + str(e))
        else:
            print('CyREST online!')
144992
def check_all_servers():
    """"""
    data = datatools.get_data()
    for server_id in data["discord"]["servers"]:
        is_in_client = False
        for client_server in client.servers:
            if server_id == client_server.id:
                is_in_client = True
                break

        if not is_in_client:
            remove_server_data(server_id)
887311
function (status, condition) {
        var that = this._connection;
        if (this._autoService && status === Strophe.Status.CONNECTED) {
            this.service =  'pubsub.'+Strophe.getDomainFromJid(that.jid);
            this.jid = that.jid;
        }
    }
829589
public function initStatusFromResponse()
    {
        // Setting wrapper status
        if ($this->serverRawResponse->isSuccess()) {
            $this->status = true;
        } else {
            $this->status = false;
        }
    }
364236
def status(context):
    """"""
    context.obj.find_repo_type()
    context.obj.call([context.obj.vc_name, 'status'])
824597
def status(self, status, headers=None):
        '''
        
        '''
        self.response = _Response(status, headers)
        return self
218136
private void checkForTermination() {
    synchronized (lock) {
      if (shutdown && transports.isEmpty() && transportServersTerminated) {
        if (terminated) {
          throw new AssertionError("Server already terminated");
        }
        terminated = true;
        channelz.removeServer(this);
        if (executor != null) {
          executor = executorPool.returnObject(executor);
        }
        lock.notifyAll();
      }
    }
  }
640455
def status(self):
        """"""
        result = set()
        for line in self._execute('svn stat')[1].splitlines():
            if line[0] == '?':
                result.add((FileStatus.Added, line[2:].strip()))
            elif line[0] == '!':
                result.add((FileStatus.Removed, line[2:].strip()))
        return result
803413
def status(self):
        
        if not self.created:
            return None
        self.inner().reload()
        return self.inner().status
592937
def is_running(self, port):
        """"""
        try:
            con = self.client('localhost:%s' % port)
            con.admin.command('ping')
            return True
        except (AutoReconnect, ConnectionFailure, OperationFailure):
            # Catch OperationFailure to work around SERVER-31916.
            return False
1259856
def check_response_status(self, response):
        
        if not (200 <= response.status_code < 300):
            try:
                message = response.json()["errors"]
            except Exception:
                message = None
            floyd_logger.debug("Error received : status_code: {}, message: {}".format(response.status_code,
                                                                                      message or response.content))
            if response.status_code == 400:
                raise BadRequestException(response)
            elif response.status_code == 401:
                raise AuthenticationException()
            elif response.status_code == 403:
                raise AuthorizationException(response)
            elif response.status_code == 404:
                raise NotFoundException()
            elif response.status_code == 429:
                raise OverLimitException(response.json().get("message"))
            elif response.status_code == 502:
                raise BadGatewayException()
            elif response.status_code == 504:
                raise GatewayTimeoutException()
            elif response.status_code == 423:
                raise LockedException()
            elif 500 <= response.status_code < 600:
                if 'Server under maintenance' in response.content.decode():
                    raise ServerException('Server under maintenance, please try again later.')
                else:
                    raise ServerException()
            else:
                msg = "An error occurred. Server response: {}".format(response.status_code)
                raise FloydException(message=msg)
950487
def checkTikaServer(scheme="http", serverHost=ServerHost, port=Port, tikaServerJar=TikaServerJar, classpath=None, config_path=None):
    '''
    
    '''
    if classpath is None:
        classpath = TikaServerClasspath
    if port is None:
        port = '443' if scheme == 'https' else '80'

    urlp = urlparse(tikaServerJar)
    serverEndpoint = '%s://%s:%s' % (scheme, serverHost, port)
    jarPath = os.path.join(TikaJarPath, 'tika-server.jar')
    if 'localhost' in serverEndpoint or '127.0.0.1' in serverEndpoint:
        alreadyRunning = checkPortIsOpen(serverHost, port)

        if not alreadyRunning:
            if not os.path.isfile(jarPath) and urlp.scheme != '':
                getRemoteJar(tikaServerJar, jarPath)

            if not checkJarSig(tikaServerJar, jarPath):
                os.remove(jarPath)
                tikaServerJar = getRemoteJar(tikaServerJar, jarPath)

            status = startServer(jarPath, TikaJava, serverHost, port, classpath, config_path)
            if not status:
                log.error("Failed to receive startup confirmation from startServer.")
                raise RuntimeError("Unable to start Tika server.")
    return serverEndpoint
1131572
def status(to, show, status="")
      httpost('/statuses', reqdata().merge({
        :nick => @endpoint[:nick],
        :to => to,
        :show => show,
        :status => status
      }))
    end
1113644
def do_status(self, _):
        '''  '''
        server_status = self.server.is_server_running()
        if server_status == 'yes':
            print 'Server: ' + colorize('currently online', 'green')
        elif server_status == 'no':
            print 'Server: ' + colorize('currently offline', 'red')
        elif server_status == 'maybe':
            print 'Server: ' + colorize('status unknown', 'yellow')
        elif server_status == 'blocked':
            print 'Server: ' + colorize('blocked', 'red')
644328
def check_rest_server_quick(rest_port):
    ''''''
    response = rest_get(check_status_url(rest_port), 5)
    if response and response.status_code == 200:
        return True, response
    return False, None
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)
80106
def check_server(self):
        
        msg = 'API server not found. Please check your API url configuration.'

        try:
            response = self.session.head(self.domain)
        except Exception as e:
            raise_from(errors.ServerError(msg), e)

        try:
            self._check_response(response)
        except errors.NotFound as e:
            raise raise_from(errors.ServerError(msg), e)