Process to update status.
979445
def after_processing(eng, objects):
        """"""
        super(InvenioProcessingFactory, InvenioProcessingFactory)\
            .after_processing(eng, objects)
        if eng.has_completed:
            eng.save(WorkflowStatus.COMPLETED)
        else:
            eng.save(WorkflowStatus.HALTED)
        db.session.commit()
402946
def status(self, key, value):
        """"""
        value = value.lower()
        if value not in valid_statuses:
            raise ValueError("Build Status must have a value from:\n{}".format(", ".join(valid_statuses)))

        self.obj['status'][key] = value
        self.changes.append("Updating build:{}.status.{}={}"
                            .format(self.obj['name'], key, value))
        return self
1037510
def on_status_update(self, channel, callback):
        
        if channel not in self._callbacks:
            self._callbacks[channel] = []
        self._callbacks[channel].append(callback)
618090
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        if self.input_method == 'local':
            # Update stats using the standard system lib
            self.uptime = datetime.now() - datetime.fromtimestamp(psutil.boot_time())

            # Convert uptime to string (because datetime is not JSONifi)
            stats = str(self.uptime).split('.')[0]
        elif self.input_method == 'snmp':
            # Update stats using SNMP
            uptime = self.get_stats_snmp(snmp_oid=snmp_oid)['_uptime']
            try:
                # In hundredths of seconds
                stats = str(timedelta(seconds=int(uptime) / 100))
            except Exception:
                pass

        # Update the stats
        self.stats = stats

        return self.stats
219382
public void update(CmsPublishItemStatus status) {

        if (status.isDisabled()) {
            m_selectedCheckBox.setEnabled(false);
            m_selectedCheckBox.setChecked(false);
            m_removeCheckBox.setChecked(status.getState() == State.remove);
            updateRemoval(status.getState() == State.remove);
        } else {
            switch (status.getState()) {
                case remove:
                    m_selectedCheckBox.setChecked(false);
                    m_selectedCheckBox.setEnabled(false);
                    m_removeCheckBox.setChecked(true);
                    updateRemoval(true);
                    break;
                case publish:
                    m_selectedCheckBox.setEnabled(true);
                    m_selectedCheckBox.setChecked(true);
                    m_removeCheckBox.setChecked(false);
                    updateRemoval(false);
                    break;
                case normal:
                default:
                    m_selectedCheckBox.setChecked(false);
                    m_selectedCheckBox.setEnabled(true);
                    m_removeCheckBox.setChecked(false);
                    updateRemoval(false);
                    break;

            }
        }
    }
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})
761574
def update(self, data):
        """"""
        if data is None:
            for device in self.devices:
                device.clear_info()
        else:
            for device, device_info in zip(self.devices, data):
                device.device_info = device_info
                self.connection.log("Device information updated -> [{}]".format(device))
1272746
def update_status(self, new_status=None):
        """"""
        _LOGGER.debug("update_status: Zone %s", self.zone_id)

        if self.status and new_status is None:
            _LOGGER.debug("Zone: healthy.")
        else:
            old_status = self.status or {}

            if new_status:
                # merge new_status with existing for comparison
                _LOGGER.debug("Set status: provided")

                # make a copy of the old_status
                status = old_status.copy()

                # merge updated items into status
                status.update(new_status)

                # promote merged_status to new_status
                new_status = status
            else:
                _LOGGER.debug("Set status: own")
                new_status = self.get_status()

            _LOGGER.debug("old_status: %s", old_status)
            _LOGGER.debug("new_status: %s", new_status)
            _LOGGER.debug("is_equal: %s", old_status == new_status)

            if new_status != old_status:
                self.handle_message(new_status)
                self._status_sent = False
                self.status = new_status

        if not self._status_sent:
            self._status_sent = self.update_hass()
1221682
def set_status(self, value):
        
        if not self._status == value:
            old = self._status
            self._status = value
            logger.info("{} changing status from {} to {}".format(self, old.name, value.name))
            self._statusChanged(old, value)
848917
def update_status(self, helper, status):
        
        if status:
            self.status(status[0])

            # if the status is ok, add it to the long output
            if status[0] == 0:
                self.add_long_output(status[1])
            # if the status is not ok, add it to the summary
            else:
                self.add_summary(status[1])
1010425
def on_status(self, status):
        """"""
        self.out.write(json.dumps(status))
        self.out.write(os.linesep)

        self.received += 1
        return not self.terminate
782725
protected function updateOrderStatus()
    {
        $data = array('status' => $this->getModuleSetting('order_status_success'));
        $this->order->update($this->data_order['order_id'], $data);
        $this->data_order = $this->order->get($this->data_order['order_id']);
    }
1289283
def update(self):
        """"""
        # Get the current processes list (once)
        processlist = glances_processes.getlist()

        # Iter upon the AMPs dict
        for k, v in iteritems(self.get()):
            if not v.enable():
                # Do not update if the enable tag is set
                continue

            amps_list = self._build_amps_list(v, processlist)

            if len(amps_list) > 0:
                # At least one process is matching the regex
                logger.debug("AMPS: {} processes {} detected ({})".format(len(amps_list),
                                                                          k,
                                                                          amps_list))
                # Call the AMP update method
                thread = threading.Thread(target=v.update_wrapper, args=[amps_list])
                thread.start()
            else:
                # Set the process number to 0
                v.set_count(0)
                if v.count_min() is not None and v.count_min() > 0:
                    # Only display the "No running process message" if countmin is defined
                    v.set_result("No running process")

        return self.__amps_dict
869496
def handle_status(self):
        """"""
        status = self.get_status()

        if status:
            # Update main-zone
            self.zones['main'].update_status(status)
730264
def update_status(self, value, value_set):
        """"""
        self._status = value
        self._status_set = value_set
        self.repaint()
        self.update()
999310
def update_status(type, state)
      @status[type] = state
      (@status_callbacks || []).each do |callback|
        begin
          callback.call(type, state)
        rescue RuntimeError => e
          ErrorTracker.log(self, "Failed status callback", e, nil, :caller)
        end
      end
      @status
    end
95827
def update_status(self, header, message):
        """"""
        with self._lock:
            if self.message_box:
                self.message_box.erase()
                self.message_box.move(0, 0)
                for n, field in enumerate(header):
                    if n == 0:
                        self.message_box.addstr(field + ":", curses.color_pair(1))
                    else:
                        self.message_box.addstr(
                            ", " + field + ":", curses.color_pair(1)
                        )
                    self.message_box.addstr(header[field])
                self.message_box.addstr(": ", curses.color_pair(1))
                self.message_box.addstr(
                    str(message), curses.color_pair(2) + curses.A_BOLD
                )
                self.message_box.refresh()
            if (
                message["host"] not in self._node_status
                or int(header["timestamp"])
                >= self._node_status[message["host"]]["last_seen"]
            ):
                self._node_status[message["host"]] = message
                self._node_status[message["host"]]["last_seen"] = int(
                    header["timestamp"]
                )