Update the storage backend (i.e., save the messages).

        Raise ValueError if not all messages could be stored and DEBUG is True.
423378
def process_response(self, request, response):
        
        # A higher middleware layer may return a request which does not contain
        # messages storage, so make no assumption that it will be there.
        if hasattr(request, '_messages'):
            unstored_messages = request._messages.update(response)
            if unstored_messages and settings.DEBUG:  # pragma: no-cover
                raise ValueError('Not all temporary messages could be stored.')
        if hasattr(request, '_alarms'):
            unstored_alarms = request._alarms.update(response)
            if unstored_alarms and settings.DEBUG:  # pragma: no-cover
                raise ValueError('Not all temporary alarms could be stored.')
        return response
572471
private function update_error_messages() {

		$this->logger or $this->logger = ( new Error\ErrorLoggerFactory() )->get_logger();
		$this->logger->log_error( $this->get_error_code(), $this->get_input_data() );
		$this->messages[] = $this->logger->get_last_message();
	}
155588
def _can_update(self):
        
        if not self._is_persisted: return False
        pks = self._primary_keys.keys()
        return all([not self._values[k].changed for k in self._primary_keys])
454044
function update() {
  if (!windowStorage.supported) return;

  var data = window.name
    , length = 0
    , key;

  storage = data.charAt(0) === prefix
    ? qs.parse(data.slice(1))
    : {};

  for (key in storage) {
    if (has.call(storage, key)) length++;
  }

  windowStorage.length = length;
}
675950
def save
      raise EntityModelIsNotPersistedError unless entity.persisted?

      if persisted?
        return false unless changed?
        update
      else
        create
      end

      @previously_changed = changes
      @changed_attributes.clear

      true
    end
829892
def put(self, storagemodel:object, modeldefinition = None) -> StorageQueueModel:
        
        try:
            message = modeldefinition['queueservice'].put_message(storagemodel._queuename, storagemodel.getmessage())
            storagemodel.mergemessage(message)

        except Exception as e:
            storagemodel = None
            msg = 'can not save queue message:  queue {} with message {} because {!s}'.format(storagemodel._queuename, storagemodel.content, e)
            raise AzureStorageWrapException(msg=msg)
           
        finally:
            return storagemodel
421941
function update(requestObj, callback) {

            var i, found, storedData, storage;

            storage = this;

            callback = callback || function(){};

            if ((typeof requestObj) === 'undefined' || requestObj === null) {
                callback(null);
                return this;
            }
            
            requestObj.config = {};
            requestObj.config.url = requestObj.config.url || this.url.put;
            requestObj.config.type = requestObj.config.type || this.constructor.REQUEST_TYPE_POST;

            if (requestObj.data) {
                for (i = 0; i < storage.preprocessors.length; i++) {
                    requestObj.data = storage.preprocessors[i](requestObj.data, requestObj);
                }
            }

            this.constructor._sendRequest(requestObj, function(data){
                for (i = 0; i < storage.processors.length; i++) {
                    data = storage.processors[i](data, requestObj);
                }
                callback(data);
            });

            return this;
        }
180999
def update(self):
        

        if not self._track_changes:
            return True  # there's nothing to update

        data = self.to_api_data(restrict_keys=self._track_changes)
        response = self.session.patch(self.build_url(''), data=data)
        if not response:
            return False

        data = response.json()

        for field in self._track_changes:
            setattr(self, snakecase(field), data.get(field))
        self._track_changes.clear()

        return True
607939
def update(self, **kwargs):
        
        if not self.object_id:
            return False

        url = self.build_url(
            self._endpoints.get('item').format(id=self.object_id))

        data = {self._cc(key): value for key, value in kwargs.items() if
                key in {'name',
                        'description'}}  # convert keys to protocol casing
        if not data:
            return False

        response = self.con.patch(url, data=data)
        if not response:
            return False

        new_data = response.json()

        for key in data:
            value = new_data.get(key, None)
            if value:
                setattr(self, self.protocol.to_api_case(key), value)

        return True
898488
def update(self, update_finished_cb):
        """"""
        if not self._update_finished_cb:
            self._update_finished_cb = update_finished_cb
            self.valid = False
            logger.debug('Updating content of memory {}'.format(self.id))
            # Start reading the header
            self.mem_handler.read(self, 0, 11)
246377
def save_updates(self):
        """"""

        if not self._track_changes:
            return True  # there's nothing to update

        url = self.build_url(self._endpoints.get('update_list_item').format(item_id=self.object_id))
        update = {field: value for field, value in self.fields.items()
                  if self._cc(field) in self._track_changes}

        response = self.con.patch(url, update)
        if not response:
            return False
        self._clear_tracker()
        return True
1179865
def update(self, data):
        
        try:
            self.verifier.update(data)
        except TypeError:
            log.error("Invalid data: {} ({})".format(type(data), data))
            raise
392258
def update(self, **kwargs):
        

        old_json = self.__json__()

        for prop in kwargs:
            setattr(self, prop, kwargs[prop])

        # We send notif only if object has changed
        if old_json != self.__json__():
            self.controller.notification.emit("project.updated", self.__json__())
            self.dump()
1364388
def update(self, item, **kwargs):
        
        if isinstance(item, dict):
            self._dict.update(item)
        elif isinstance(item, Message):
            for key, val in item.items():
                self._dict[key] = val
        else:
            raise ValueError("Can't update message using: '%s'" % (item,))
1160767
def _update_data(self, *data_dict, **kwargs):
        

        # Load each of the fields given in the data dictionary
        self.errors = {}

        for data in data_dict:
            if not isinstance(data, dict):
                raise AssertionError(
                    f'Positional argument "{data}" passed must be a dict.'
                    f'This argument serves as a template for loading common '
                    f'values.'
                )
            for field_name, val in data.items():
                setattr(self, field_name, val)

        # Now load against the keyword arguments
        for field_name, val in kwargs.items():
            setattr(self, field_name, val)

        # Raise any errors found during update
        if self.errors:
            raise ValidationError(self.errors)
1317392
def update_backends(cls, id_mapping, custom_trees, backend=None):
        
        backend = Store.current_backend if backend is None else backend
        # Update the custom option entries for the current backend
        Store.custom_options(backend=backend).update(custom_trees)

        # Propagate option ids for non-selected backends
        for b in Store.loaded_backends():
            if b == backend:
                continue
            backend_trees = Store._custom_options[b]
            for (old_id, new_id) in id_mapping:
                tree = backend_trees.get(old_id, None)
                if tree is not None:
                    backend_trees[new_id] = tree
382171
def update(self, data):
        """"""
        if not isinstance(data, list): data = [data] # otherwise no conversion is necessary
        master = Handler.ALL_VERS_DATA
        for record in data:
            #print(record)
            for k,v in iteritems(record): # ensure record contents aretyped appropriately
                try:                record[k] = int(v)
                except ValueError:  record[k] = v
            try: label = record["label"] # verify this record has the required 'label' key
            except KeyError:
                raise ValueError("Must provide a valid label argument.  Given:%s%s"%(\
                    os.linesep, ("%s  "%(os.linesep)).join(
                        ["%15s:%s"%(k,v) for k,v in iteritems(kwargs)]
                    )))
            try:    masterLabel = master[label] # identify the already existing record that matches this to-be-updated record, if any
            except KeyError: # master hasn't been defined yet
                master[label] = record
                self._updated = True # a new record should also be saved
                continue
            for k,v in iteritems(record): # determine whether master needs to be updated
                try:
                    if masterLabel[k] == v:  continue # whether an entry in the record needs to be updated (doesn't match)
                except KeyError:             pass # this condition means that k is a new key, so the record must be updated
                self._updated = True
                try:    master[label].update(record) # index each record by its label
                except KeyError:             break