Deletes any sessions that have reached their maximum validity.

 :api: private
507117
def reap_expired_sessions
      @timestamps.each do |session_id,stamp|
        delete_session(session_id) if (stamp + @session_ttl) < Time.now 
      end
      GC.start
    end
1272762
def kill_current_session(ctx: Context_T) -> None:
    
    ctx_id = context_id(ctx)
    if ctx_id in _sessions:
        del _sessions[ctx_id]
661546
def destroy_session(self, session_id):
        

        try:
            del self.sessions[session_id]
        except KeyError:
            pass

        # Invoke hooks
        invoke_hooks(self.hooks, "session_destroyed", session_id)
507566
def clear(self, ts=None):
        
        sp_key = "%s:session_prepare" % self.namespace(ts or int(time.time()))
        return self.r.delete(sp_key)
810390
def delete(self, session, commit=True, soft=True):
        
        if soft:
            self.time_removed = sqlalchemy.func.unix_timestamp()
        else:
            session.delete(self)

        if commit:
            session.commit()
930762
def user_sessions_delete(self, user_id, **kwargs):
        ""
        api_path = "/api/v2/users/{user_id}/sessions.json"
        api_path = api_path.format(user_id=user_id)
        return self.call(api_path, method="DELETE", **kwargs)
579612
def close_session(self):
        
        with self._graph.as_default():
            self._sess.close()
            self._sess = None
792258
def stop(self, reason=''):
        
        key = '/status/sessions/terminate?sessionId=%s&reason=%s' % (self.session[0].id, quote_plus(reason))
        return self._server.query(key)
790452
def clear(self, apply_to='all'):
        
        url = self.build_url(self._endpoints.get('clear_range'))
        return bool(self.session.post(url, data={'applyTo': apply_to.capitalize()}))
516219
def clear():
    
    utils.check_for_local_server()
    click.confirm(
        "Are you sure you want to do this? It will delete all of your data",
        abort=True
    )
    server = Server(config["local_server"]["url"])
    for db_name in all_dbs:
        del server[db_name]
924036
def end(self):
		''' '''
		self.cache = {}
		if self.transactions:
			raise TransactionException('Tried to end session with an open '
									   'transaction')
		if not PYMONGO_3:
			self.db.connection.end_request()
93580
def delete_if
      reset_meta_data
      keep_points = []
      last_pt = nil
      points.each do |pt|
        next if yield(pt)
        keep_points << pt
        update_meta_data(pt, last_pt)
        last_pt = pt
      end
      @points = keep_points
    end
1054418
def delete(self, *args, **kwargs):
        
        return self.session.delete(*args, **self.get_kwargs(**kwargs))
927915
function clear() {
  // TODO: Only remove used items
  data = {};
  if (localExists()) {
    try {
      // Clear session storage
      window.sessionStorage.clear();
    } catch (error) {
      _logger2.default.warn({
        description: 'Session storage could not be cleared.', error: error,
        obj: 'storage', func: 'removeItem'
      });
    }
  }
}
113225
def reset(self):
        
        self.reached_limit = False
        self.count = 0
        self.seen.clear()
63897
def session_end(self):
        
        self.session_depth -= 1
        self.session_depth = max(0, self.session_depth)
        if self.session_depth == 0:
            self._session_end()
88365
def teardown(self):
        
        with self._teardown_lock:
            if not self._teardown_called:
                self._teardown_called = True
                if len(self._acquiring_session_ids) > 0:
                    logger.info(
                        f"Destroying all sessions that have not acquired keys: {self._acquiring_session_ids}...")
                for session_id in self._acquiring_session_ids:
                    try:
                        self.consul_client.session.destroy(session_id=session_id)
                        logger.debug(f"Destroyed: {session_id}")
                    except requests.exceptions.ConnectionError as e:
                        logger.debug(f"Exception: {e}")
                        logger.warning(f"Could not connect to Consul to clean up session {session_id}")
                atexit.unregister(self.teardown)