Update the FaxInstance

        :param FaxInstance.UpdateStatus status: The new status of the resource

        :returns: Updated FaxInstance
        :rtype: twilio.rest.fax.v1.fax.FaxInstance
169600
def update(self, status=values.unset):
        
        return self._proxy.update(status=status, )
1060516
def update_state_from_api(self):
        
        if self.last_api_call is not None:
            difference = (datetime.datetime.now() - self.last_api_call).seconds
        else:
            # This is the first run, so we need to get the lastest state.
            difference = 301
        if difference >= 300:
            url = BASE_URL + "/rest/item"
            payload = {'usertoken': self.token}
            arequest = requests.get(url, params=payload)
            status = str(arequest.status_code)
            if status == '401':
                _LOGGER.info("Token expired? Trying to get a new one.")
                self.authenticate(True)
                arequest = requests.get(url, params=payload)
                status = arequest.status_code
            elif status == '404':
                _LOGGER.error("No devices associated with this account.")
            elif status != '200':
                _LOGGER.error("API error not updating state. " + status)
            else:
                self.state = arequest.json()
            self.last_api_call = datetime.datetime.now()
            _LOGGER.info("Pulled latest state from API.")
1134916
def set_status(self, status):
        
        if status is not self.status:
            logger.debug("Setting %s state to %s.", self.stack.name,
                         status.name)
            self.status = status
            self.last_updated = time.time()
            if self.stack.logging:
                log_step(self)
1245296
def update(self, sent):
        
        self.offset = sent

        now = datetime.datetime.now()

        elapsed = (now - self.startTime).total_seconds()
        if elapsed > 0:
            mbps = (sent * 8 / (10 ** 6)) / elapsed
        else:
            mbps = None

        self._display(sent, now, self.name, mbps)
1044313
private function updateStatus()
    {
        if (isset($this->inputs['status']) && trim($this->inputs['status']) !== '') {
            $this->connectToWhatsApp();
            $this->wa->sendStatusUpdate($this->inputs['status']);
            exit(json_encode([
                'success'  => true,
                'data'     => "<br />Your status was updated to - <b>{$this->inputs['status']}</b>",
                'messages' => $this->messages,
            ]));
        } else {
            exit(json_encode([
                'success'  => false,
                'errormsg' => 'There was no text in the submitted status box!',
            ]));
        }
    }
1147322
def _set_status(self, status, message=''):
        

        message = message.strip()

        # fetch away message from provided id
        if message.startswith(':'):
            msg_id = message[1:]
            message = self.messages.get(msg_id, '')

        message = message.encode('utf-8', 'replace')

        # attempt to set status for each supported application
        for func in self.set_status_funcs:
            func(status, message)
789562
def new_cast_status(self, status):
        
        self.status = status
        if status:
            self.status_event.set()
309153
def change_status(self, status):
        

        def cb():
            self.user.update(status=status)
            return status

        return signals.user_update(self, ACTIONS["STATUS"], cb,
                                   data={"status": self.status})
487600
public void update(StatusData<T> status) {
        if (status == null) {
            throw new IllegalArgumentException("Received null as status data!");
        }
        neverUpdated = false;
        handleStatsResetIfNeeded(status);
        for (T metric : metrics) {
            Object value = status.get(metric);
            if (value == null) {
                getLogger().warn("StatusData contains no value for metric '"+metric.getCaption() + "'.");
                continue;
            }
            StatValue stat = getMonitoredStatValue(metric);
            switch (metric.getType()) {
                case INT: stat.setValueAsInt(Integer.class.cast(value)); break;
                case DOUBLE: stat.setValueAsDouble(Double.class.cast(value)); break;
                case STRING: stat.setValueAsString(value.toString()); break;
                case COUNTER:
                case DIFFLONG:
                case LONG: stat.setValueAsLong(Long.class.cast(value));break;
                default: stat.setValueAsString(value.toString()); break;
            }
        }
    }
1311878
def set_status(self, id, status, timeout, update_time, history=None):
        
        query = {'_id': {'$regex': '^' + id}}

        update = {
            '$set': {'status': status, 'timeout': timeout, 'updateTime': update_time},
            '$push': {
                'history': {
                    '$each': [history.serialize],
                    '$slice': -abs(current_app.config['HISTORY_LIMIT'])
                }
            }
        }
        return self.get_db().alerts.find_one_and_update(
            query,
            update=update,
            projection={'history': 0},
            return_document=ReturnDocument.AFTER
        )
888222
def set_status(self, status, origin=None, force=False):
        

        if status != self.default:
            self._setup_reset_delay()

        if self.status_filter:
            status = self.status_filter(status)

        return self._do_change_status(status, force)
284540
def _update_zone(self, zone, status=None):
        
        if not zone in self._zones:
            raise IndexError('Zone does not exist and cannot be updated: %d', zone)

        old_status = self._zones[zone].status
        if status is None:
            status = old_status

        self._zones[zone].status = status
        self._zones[zone].timestamp = time.time()

        if status == Zone.CLEAR:
            if zone in self._zones_faulted:
                self._zones_faulted.remove(zone)

            self.on_restore(zone=zone)
        else:
            if old_status != status and status is not None:
                self.on_fault(zone=zone)
80562
def update(self, callback=None, errback=None, **kwargs):
        
        if not self.data:
            raise MonitorException('monitor not loaded')

        def success(result, *args):
            self.data = result
            if callback:
                return callback(self)
            else:
                return self

        return self._rest.update(self.data['id'], {}, callback=success, errback=errback, **kwargs)
44349
def _update_statuses(self, sub_job_num=None):
        
        # initialize status dictionary
        status_dict = dict()

        for val in CONDOR_JOB_STATUSES.values():
            status_dict[val] = 0

        for node in self.node_set:
            job = node.job
            try:
                job_status = job.status
                status_dict[job_status] += 1
            except (KeyError, HTCondorError):
                status_dict['Unexpanded'] += 1

        return status_dict
244854
def update_check(self, entity, check, label=None, name=None, disabled=None,
            metadata=None, monitoring_zones_poll=None, timeout=None,
            period=None, target_alias=None, target_hostname=None,
            target_receiver=None):
        
        entity.update_check(check, label=label, name=name, disabled=disabled,
                metadata=metadata, monitoring_zones_poll=monitoring_zones_poll,
                timeout=timeout, period=period, target_alias=target_alias,
                target_hostname=target_hostname,
                target_receiver=target_receiver)
562126
synchronized void statusUpdate(TaskStatus status) {
    setProgress(status.getProgress());
    this.runState = status.getRunState();
    this.stateString = status.getStateString();
    this.nextRecordRange = status.getNextRecordRange();

    setDiagnosticInfo(status.getDiagnosticInfo());
    
    if (status.getStartTime() > 0) {
      this.startTime = status.getStartTime(); 
    }
    if (status.getFinishTime() > 0) {
      setFinishTime(status.getFinishTime()); 
    }
    
    this.phase = status.getPhase();
    this.counters = status.getCounters();
    this.outputSize = status.outputSize;
  }
481560
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqi2*con.tind)