Return updated status
766099
static function link_objects($obj1, $obj2, $params = array())
	{
		if(!$obj1 || !$obj2)
			return false;

		// Don't use expression. I's lazy and not works for thow argument if first true.
		$up1 = self::link_object_to($obj1, $obj2, $params);
		$up2 = self::link_object_to($obj2, $obj1, $params);
		return $up1 || $up2;
	}
786433
def status(self):
        ''''''
        message = self.status_message
        if message is None:
            message = STATUS[self.status_code]
        return '%s %s' % (self.status_code, message)
858019
def check_for_update(self, force=True, download=False):
        
        part = '/updater/check?download=%s' % (1 if download else 0)
        if force:
            self.query(part, method=self._session.put)
        releases = self.fetchItems('/updater/status')
        if len(releases):
            return releases[0]
819532
def get_status(self, batch_id):
        
        with self._lock:
            if self._batch_committed(batch_id):
                return ClientBatchStatus.COMMITTED
            if batch_id in self._invalid:
                return ClientBatchStatus.INVALID
            if batch_id in self._pending:
                return ClientBatchStatus.PENDING
            return ClientBatchStatus.UNKNOWN
900754
def status_get():
    
    cmd = ['status-get', "--format=json", "--include-data"]
    try:
        raw_status = subprocess.check_output(cmd)
    except OSError as e:
        if e.errno == errno.ENOENT:
            return ('unknown', "")
        else:
            raise
    else:
        status = json.loads(raw_status.decode("UTF-8"))
        return (status["status"], status["message"])
1342201
function getStatus(url) {
  var client = new HttpClient(url);
  var executor = new Executor(client);
  var command = new Command(CommandName.GET_SERVER_STATUS);
  return executor.execute(command);
}
192634
def status(self):
        
        if isinstance(self.attrs['State'], dict):
            return self.attrs['State']['Status']
        return self.attrs['State']
1159106
function checkUpdateStatus() {
        var filesToCache = ['.logs'],
            downloadCompleted = updateJsonHandler.get("downloadCompleted"),
            updateInitiatedInPrevSession = updateJsonHandler.get("updateInitiatedInPrevSession");

        if (downloadCompleted && updateInitiatedInPrevSession) {
            var isNewVersion = checkIfVersionUpdated();
            updateJsonHandler.reset();
            if (isNewVersion) {
                // We get here if the update was successful
                UpdateInfoBar.showUpdateBar({
                    type: "success",
                    title: Strings.UPDATE_SUCCESSFUL,
                    description: ""
                });
                HealthLogger.sendAnalyticsData(
                    autoUpdateEventNames.AUTOUPDATE_INSTALLATION_SUCCESS,
                    "autoUpdate",
                    "install",
                    "complete",
                    ""
                );
            } else {
                // We get here if the update started but failed
                checkInstallationStatus();
                UpdateInfoBar.showUpdateBar({
                    type: "error",
                    title: Strings.UPDATE_FAILED,
                    description: Strings.GO_TO_SITE
                });
            }
        } else if (downloadCompleted && !updateInitiatedInPrevSession) {
            // We get here if the download was complete and user selected UpdateLater
            if (brackets.platform === "mac") {
                filesToCache = ['.dmg', '.json'];
            } else if (brackets.platform === "win") {
                filesToCache = ['.msi', '.json'];
            }
        }

        postMessageToNode(MessageIds.PERFORM_CLEANUP, filesToCache);
    }
1069282
def process_status(self, helper, session, check):
        """""""
        snmp_result_status = helper.get_snmp_value(session, helper, DEVICE_GLOBAL_OIDS['oid_' + check])

        if check == "system_lcd":
            helper.update_status(helper, normal_check("global", snmp_result_status, "LCD status"))
        elif check == "global_storage":
            helper.update_status(helper, normal_check("global", snmp_result_status, "Storage status"))
        elif check == "system_power":
            helper.update_status(helper, self.check_system_power_status(snmp_result_status))
        elif check == "global_system":
            helper.update_status(helper,
                                 normal_check("global", snmp_result_status, "Device status"))
385522
def update_status(self, *pargs, **kwargs):
        
        try:
            return super(API, self).update_status(*pargs, **kwargs)

        except tweepy.TweepError as e:
            if getattr(e, 'api_code', None) == 503:
                sleep(10)
                return super(API, self).update_status(*pargs, **kwargs)
            else:
                raise e
388778
def get_status(self):
        
        if self.status is not None:
            return self.status
        if self.subsection == "dmdSec":
            if self.older is None:
                return "original"
            else:
                return "updated"
        if self.subsection in ("techMD", "rightsMD"):
            # TODO how to handle ones where newer has been deleted?
            if self.newer is None:
                return "current"
            else:
                return "superseded"
        return None
1209644
async def status(cls):
        '''
        
        '''
        rqst = Request(cls.session, 'GET', '/manager/status')
        rqst.set_json({
            'status': 'running',
        })
        async with rqst.fetch() as resp:
            return await resp.json()
1340983
function getStatus(url, callback) {
  var client = new HttpClient(url);
  var executor = new Executor(client);
  var command = new Command(CommandName.GET_SERVER_STATUS);
  executor.execute(command, function(err, responseObj) {
    if (err) return callback(err);
    try {
      checkResponse(responseObj);
    } catch (ex) {
      return callback(ex);
    }
    callback(null, responseObj['value']);
  });
}
573043
def update(self, status, source=None, params={}):
        ""
        params = params.copy()
        params['status'] = status
        if source:
            params['source'] = source
        return self.__parsed_post(self.__post('/statuses/update.xml', params),
            txml.parseUpdateResponse)
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()
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')
212316
def update(self, status):
        
        data = values.of({'Status': status, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return VerificationInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )