Update ticket state.
435646
protected void updateTicketState() {
        LOGGER.trace("Before updating ticket [{}]\n\tPrevious time used: [{}]\n\tLast time used: [{}]\n\tUsage count: [{}]",
            getId(), this.previousTimeUsed, this.lastTimeUsed, this.countOfUses);

        this.previousTimeUsed = ZonedDateTime.from(this.lastTimeUsed);
        this.lastTimeUsed = ZonedDateTime.now(ZoneOffset.UTC);
        this.countOfUses++;

        LOGGER.trace("After updating ticket [{}]\n\tPrevious time used: [{}]\n\tLast time used: [{}]\n\tUsage count: [{}]",
            getId(), this.previousTimeUsed, this.lastTimeUsed, this.countOfUses);
    }
452046
private function updateStatus()
    {
        $status = $this->deliveryExecution->getState()->getUri();
        $this->addValue(DeliveryMonitoringService::STATUS, $status, true);
        if ($status == ProctoredDeliveryExecution::STATE_PAUSED) {
            $this->addValue(DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP, microtime(true), true);
        }
    }
482569
def update_status(self, new_status):
        """"""
        timestamp = time.time()
        self.status_history[-1]["end"] = timestamp
        self.status_history.append(
            {"start": timestamp, "end": None, "status": new_status}
        )
755335
def update(self, state, tnow):
        ''''''
        self.state = state
        self.update_time = tnow
468330
def update_state(self):
        """"""
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.settimeout(self._timeout)
        try:
            if sock.connect_ex((self._ip, self._port['state'])) == 0:
                self.state = True
            else:
                self.state = False
            sock.close()
        except socket.error:
            raise
611882
async def update(self) -> None:
        """"""
        if self.next_allowed_update is not None and \
                datetime.utcnow() < self.next_allowed_update:
            return

        self.next_allowed_update = None
        await self.api._update_device_state()
        self._device_json = self._device['device_info']
175116
def update_status(status)
      if status.present?
        RRRSpec.redis.hset(key, 'status', status)
      else
        RRRSpec.redis.hdel(key, 'status')
      end
    end
839165
def update(self, retry=2) -> None:
        """"""
        try:
            _LOGGER.debug("Updating device state.")
            key = ON_KEY if not self._flip_on_off else OFF_KEY
            self.state = self._device.readCharacteristic(HANDLE) == key
        except (bluepy.btle.BTLEException, AttributeError):
            if retry < 1 or not self._connect():
                self.available = False
                _LOGGER.error("Failed to update device state.", exc_info=True)
                return None
            return self.update(retry-1)
        self.available = True
        return None
1096420
def _update_state(self, operation_pb):
        
        if operation_pb.done:
            self._complete = True

        if operation_pb.HasField("metadata"):
            self.metadata = _from_any(operation_pb.metadata)

        result_type = operation_pb.WhichOneof("result")
        if result_type == "error":
            self.error = operation_pb.error
        elif result_type == "response":
            self.response = _from_any(operation_pb.response)
546423
def update_state_changes(self, state_changes_data: List[Tuple[str, int]]) -> None:
        """"""
        cursor = self.conn.cursor()
        cursor.executemany(
            'UPDATE state_changes SET data=? WHERE identifier=?',
            state_changes_data,
        )
        self.maybe_commit()
1303
def update_active(self):
        """"""
        if self.active is not None:
            self.update_state(self.active, "normal")
        if self.current_iid == self.active:
            self._active = None
            return
        self._active = self.current_iid
        if self.active is not None:
            self.update_state(self.active, "active")
1238161
def update_state(self):
        
        response = self.api_interface.get_device_state(self, type_override="button")
        return self._update_state_from_response(response)
814105
def update(self):
        """"""
        if self.client_mode == 'glances':
            return self.update_glances()
        elif self.client_mode == 'snmp':
            return self.update_snmp()
        else:
            self.end()
            logger.critical("Unknown server mode: {}".format(self.client_mode))
            sys.exit(2)
201679
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqd2*con.tind)
269922
async def update_state(self, msg, _context):
        """"""

        name = msg.get('name')
        status = msg.get('new_status')

        await self.service_manager.update_state(name, status)
863710
def edit(self, state):
        
        if state and state.lower() == 'active':
            data = dumps({'state': state.lower()})
            json = self._json(self._patch(self._api, data=data))
            self._update_attributes(json)
        return self
689044
def verify_ticket(self, ticket):
        """"""
        (response, charset) = self.get_verification_response(ticket)
        return self.verify_response(response, charset)