Assign the status for an offline (not real-time) contact acceptance/rejection.
429551
public function processOffline()
    {
        if (!$this->realTime) {
            // Establish scrub now.
            if ($this->isScrubbed()) {
                // Asynchronous rejection (scrubbed)
                $this->status = Stat::TYPE_SCRUBBED;
                $this->valid  = false;
            } else {
                // Asynchronous acceptance.
                $this->status = Stat::TYPE_ACCEPTED;
                $this->valid  = true;
            }
        }
    }
1004270
public function sendOtherStatus() {
    $Config = GiroCheckout_SDK_Config::getInstance();

    if ($Config->getConfig('DEBUG_MODE')) {
      GiroCheckout_SDK_Debug_helper::getInstance()->logNotificationOutput('sendOtherStatus');
    }

    header('HTTP/1.1 404 Not Found');
  }
856952
function _getResponseStatus(handler, req, callback) {
        // Number
        if (!_(handler.reply.status).isFunction()) {
            return callback(handler.reply.status || 0);
        }

        // Synch function
        return callback(handler.reply.status(req) || 0);
    }
1104692
public void setRunningStatusIfNecessary() {
        if (ConnectionStatus.TRANSACTION != status.get() && ConnectionStatus.RUNNING != status.get()) {
            status.getAndSet(ConnectionStatus.RUNNING);
        }
    }
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())
441073
def _process_status(self, status):
        
        self._screen_id = status.get(ATTR_SCREEN_ID)
        self.status_update_event.set()
243928
def set_status(self, name, text='', row=0, fg='black', bg='white'):
        ''''''
        if self.is_alive():
            self.parent_pipe_send.send(Value(name, text, row, fg, bg))
939050
def set_state_from_exit_status(self, status, notif_period, hosts, services):
        
        now = time.time()

        # we should put in last_state the good last state:
        # if not just change the state by an problem/impact
        # we can take current state. But if it's the case, the
        # real old state is self.state_before_impact (it's the TRUE
        # state in fact)
        # And only if we enable the impact state change
        cls = self.__class__
        if (cls.enable_problem_impacts_states_change and
                self.is_impact and not self.state_changed_since_impact):
            self.last_state = self.state_before_impact
        else:
            self.last_state = self.state

        # There is no 1 case because it should have been managed by the caller for a host
        # like the schedulingitem::consume method.
        if status == 0:
            self.state = u'UP'
            self.state_id = 0
            self.last_time_up = int(self.last_state_update)
            # self.last_time_up = self.last_state_update
            state_code = 'u'
        elif status in (2, 3):
            self.state = u'DOWN'
            self.state_id = 1
            self.last_time_down = int(self.last_state_update)
            # self.last_time_down = self.last_state_update
            state_code = 'd'
        elif status == 4:
            self.state = u'UNREACHABLE'
            self.state_id = 4
            self.last_time_unreachable = int(self.last_state_update)
            # self.last_time_unreachable = self.last_state_update
            state_code = 'x'
        else:
            self.state = u'DOWN'  # exit code UNDETERMINED
            self.state_id = 1
            # self.last_time_down = int(self.last_state_update)
            self.last_time_down = self.last_state_update
            state_code = 'd'
        if state_code in self.flap_detection_options:
            self.add_flapping_change(self.state != self.last_state)
            # Now we add a value, we update the is_flapping prop
            self.update_flapping(notif_period, hosts, services)

        if self.state != self.last_state and \
                not (self.state == "DOWN" and self.last_state == "UNREACHABLE"):
            self.last_state_change = self.last_state_update
        self.duration_sec = now - self.last_state_change
1138032
def post(self, request, *args, **kwargs):
        
        status = 201
        accepted = {"accepted": True}
        send_invite_messages.apply_async()
        return Response(accepted, status=status)
1177927
function onStateChange(e)
    {
        if(scope._conn)
        {
            if(scope._conn.iceConnectionState == "connected")
            {
                if(scope.onConnected)
                {
                    scope.onConnected(scope);
                }
            }
            if(scope._conn.iceConnectionState == "failed" || scope._conn.iceConnectionState == "disconnected")
            {
                if(scope.onConnectionFail)
                {
                    scope.onConnectionFail(scope);
                }
                if(scope.type == "offer")
                {
                    scope.createOffer();
                }
            }
            if(scope._conn.iceConnectionState == "closed")
            {
                if(scope.onClosed)
                {
                    scope.onClosed(scope);
                }
                scope.dispose();
            }
        }
    }
1007004
def update_status(self, reset=False):
        """"""
        if self.healthy_update_timer and not reset:
            return

        # get device features only once
        if not self.device_features:
            self.handle_features(self.get_features())

        # Get status from device to register/keep alive UDP
        self.handle_status()

        # Schedule next execution
        self.setup_update_timer()
1040404
def _set_status(self, status, ex=None):
        '''  '''
        self._status = status
        logger.debug("Set status(%s) for %s" % (self._status, self.session_id))
        self.set_done()
        if ex:
            self._exception = ex
38787
def set_status(self, instance, status):
        """"""
        status_key = self.get_status_key(instance)
        cache.set(status_key, status, timeout=300)
590705
def set_status(self, status):
        

        text = ""
        colour = "#FFFFFF"
        if status == 0:
            text = "OFFLINE"
            colour = "#EF9A9A"
        elif status == 1:
            text = "STARTING"
            colour = "#FFE082"
        elif status == 2:
            text = "ONLINE"
            colour = "#A5D6A7"

        self.status.set(text)
        self.statusbar.config(background=colour)
291596
def wait_for_service(self, interval=1):
        
        while self.status in (OnlineModel.Status.DEPLOYING, OnlineModel.Status.UPDATING):
            time.sleep(interval)
        if self.status == OnlineModel.Status.DEPLOY_FAILED:
            raise OnlineModelError(self.last_fail_msg, self)
        elif self.status != OnlineModel.Status.SERVING:
            raise OnlineModelError('Unexpected status occurs: %s' % self.status.value, self)
923799
def status(self, status):
        
        allowed_values = ["pending", "awaitingRetry", "successful", "failed"]
        if status is not None and status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"
                .format(status, allowed_values)
            )

        self._status = status
776478
def request_set_status(self, text: str) -> dict:
        
        method_params = {'text': text}
        response = self.session.send_method_request('status.set',
                                                    method_params)
        self.check_for_errors('status.set', method_params, response)
        return response