Respond to the LASTSAVE command.
973326
function execute(req, res) {
  // stored in milliseconds but this command returns seconds
  res.send(null, Math.round(this.state.lastsave / 1000));
}
1373463
def finish(self):
        
        if self._has_responded:
            raise NSQException('already responded')
        self._has_responded = True
        self.on_finish.send(self)
244759
def handle_previous(self, command):
        
        self.result = command.items
        self._to_commit = self.result
511020
def handle(self, *args, **options):
        """"""
        self.verbosity = int(options.get('verbosity'))
        self.quiet = options.get('quiet')
        self._set_logger_level()

        self.servername = options.get('servername')
        self.decrypt = options.get('decrypt')
        self.uncompress = options.get('uncompress')

        self.filename = options.get('input_filename')
        self.path = options.get('input_path')

        self.replace = options.get('replace')
        self.passphrase = options.get('passphrase')
        self.interactive = options.get('interactive')

        self.storage = get_storage()
        self.media_storage = get_storage_class()()
        self._restore_backup()
108775
def serve_forever(self):
        """"""
        loop = True
        while loop:
            loop = self.__serve_forever()
        self.end()
1317999
def respond_with_with_storage(*args, &block)
      @responded_with = args.last.is_a?(Hash) ? args - [args.last] : args
      respond_with_without_storage(*args, &block)
    end
1322152
public void setLastAccessTime(long lastAccessTime) {
    while (true) {
      long current = this.lastAccessTime;
      if (current >= lastAccessTime) {
        break;
      }
      if (ACCESSTIME_UPDATER.compareAndSet(this, current, lastAccessTime)) {
        break;
      }
    }
  }
476409
def should_regenerate(self, response):
        

        if response.has_header('Last-Modified'):
            last_modified = parse_http_date(response['Last-Modified'])
            next_regen = last_modified + settings.BETTERCACHE_LOCAL_POSTCHECK
            return time.time() > next_regen
146665
public function touchLastSeen()
    {
        if ($this->isOnline()) {
            return;
        }

        $oldTimestamps = $this->timestamps;
        $this->timestamps = false;

        $this
            ->newQuery()
            ->where('id', $this->id)
            ->update(['last_seen' => $this->freshTimestamp()])
        ;

        $this->last_seen = $this->freshTimestamp();
        $this->timestamps = $oldTimestamps;
    }
101713
def lastsave(host=None, port=None, db=None, password=None):
    '''
    
    '''
    # Use of %s to get the timestamp is not supported by Python. The reason it
    # works is because it's passed to the system strftime which may not support
    # it. See: https://stackoverflow.com/a/11743262
    server = _connect(host, port, db, password)
    if six.PY2:
        return int((server.lastsave() - datetime(1970, 1, 1)).total_seconds())
    else:
        return int(server.lastsave().timestamp())
1154938
function serve(res, file, maxAge) {
  log.debug(`Serving: ${ file }`)
  res.status(200)
    .set('Cache-Control', `max-age=${ maxAge }`)
    .sendFile(file, err => {
      if (err) {
        log.error(err)
        res.status(err.status).end()
        return
      }
    })
}
1153365
def _handle_response(response, command, id_xpath='./id', **kwargs):
    
    _response_switch = {
        'insert': ModifyResponse,
        'replace': ModifyResponse,
        'partial-replace': ModifyResponse,
        'update': ModifyResponse,
        'delete': ModifyResponse,
        'search-delete': SearchDeleteResponse,
        'reindex': Response,
        'backup': Response,
        'restore': Response,
        'clear': Response,
        'status': StatusResponse,
        'search': SearchResponse,
        'retrieve': ListResponse,
        'similar': ListResponse,
        'lookup': LookupResponse,
        'alternatives': AlternativesResponse,
        'list-words': WordsResponse,
        'list-first': ListResponse,
        'list-last': ListResponse,
        'retrieve-last': ListResponse,
        'retrieve-first': ListResponse,
        'show-history': None,
        'list-paths': ListPathsResponse,
        'list-facets': ListFacetsResponse}
    try:
        request_class = _response_switch[command]
    except KeyError:
        request_class = Response
    return request_class(response, id_xpath, **kwargs)
802278
function execute(req, res) {
  Persistence.save(this.state.store, this.state.conf);
  res.send(null, Constants.OK);
}
1151875
def handle_save(self, request, response):
        
        form_valid = isinstance(response, HttpResponseRedirect)
        if request.POST.get("_save") and form_valid:
            return redirect("admin:index")
        return response
512317
def post_save(self):
        """"""
        if self.run:
            self.run = False
            self.create_tasks()
            self.save()
895644
def save_state(self):
        """"""
        set_setting('lastSourceDir', self.source_directory.text())
        set_setting('lastOutputDir', self.output_directory.text())
        set_setting(
            'useDefaultOutputDir', self.scenario_directory_radio.isChecked())
1115790
def expired(self):
        """"""
        self._data["_killed"] = True
        self.save()
        raise SessionExpired(self._config.expired_message)