returns True if status has changed
193425
def update_status(self):
        
        # this function should be part of the server

        if (self.status is not None) and self.status > 0:
            # status is already final
            return False

        old_status = self.status
       
        job_dir = self.run_dir + os.sep + self.id

        if os.path.isfile(run_dir + os.sep + 'FAILURE'):
            self.status = self.FAILED
        elif os.path.isfile(run_dir + os.sep + 'FINISHED'):
            self.status = self.FINISHED
        else:
            self.status = self.RUNNING

        if self.status != old_status:
            return True
        else:
            return False
441073
def _process_status(self, status):
        
        self._screen_id = status.get(ATTR_SCREEN_ID)
        self.status_update_event.set()
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)
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})
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')
1203056
def is_changed(self, field, from_db=False):
        
        return field in self.changed_fields(from_db=from_db)
1189326
public function hasChange()
    {
        return (
            count($this->getFieldsWithUpdate()) > 0
            || count($this->getIndexesWithUpdate()) > 0
            || $this->addSoftDelete
            || $this->dropSoftDelete
            || $this->addTimestamps
            || $this->dropTimestamps);
    }
1014021
def changed(self):
        
        # Not installed modules cannot issue a change to save
        if not self.installed:
            return False

        # Check if module status changed
        if self._info._changed:
            return True

        # Check model changes
        for model in self.models():
            if model.objects.changed().count() or \
               model.objects.deleted().count():
                return True

        # Nothing passed, module not changed
        return False
1010425
def on_status(self, status):
        """"""
        self.out.write(json.dumps(status))
        self.out.write(os.linesep)

        self.received += 1
        return not self.terminate
140214
def is_ignored(self, options):
        

        if not self.is_change():
            return False

        changes = self.collect()
        if not changes:
            return False

        for change in changes:
            if change.is_change() and not change.is_ignored(options):
                return False
        return True
414066
def is_changed():
    
    executed, changed_lines = execute_git('status --porcelain', output=False)
    merge_not_finished = mod_path.exists('.git/MERGE_HEAD')
    return changed_lines.strip() or merge_not_finished
36605
def changed(self, *value):
        """"""
        if self._last_checked_value != value:
            self._last_checked_value = value
            return True
        return False
249148
public function hasChanged()
    {
        foreach ($this->modelData as $property => $value) {
            if ($this->hasPropertyChanged($property)) {
                return true;
            }
        }

        // In case model data has been manually unset
        $manuallyUnsetProperties = array_diff_key($this->changeSnapshotData, $this->modelData);
        foreach ($manuallyUnsetProperties as $property => $value) {
            // If it wasn't null before, that's a change
            if ($value !== null) {
                return true;
            }
        }

        return false;
    }
163834
function checkStatus() {
  return server.ping(this, function(err, res) {
    if (err) {
      return out.error("error occurred: %j", err);
    }
    if (res.running) {
      return out.success("service running");
    }
    return out.error("service not running");
  });
}
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)
937073
def get_status(self):
        """"""

        result = ''
        if self._data_struct is not None:
            result = self._data_struct[KEY_STATUS]
        return result
767758
def is_state(self, status):
        
        if status == self.state:
            return True
        # Now low status
        if status == 'o' and self.state == u'UP':
            return True
        if status == 'd' and self.state == u'DOWN':
            return True
        if status in ['u', 'x'] and self.state == u'UNREACHABLE':
            return True
        return False