MCPcopy
hub / github.com/benoitc/gunicorn / logout

Method logout

examples/dirty_example/dirty_app.py:217–224  ·  view source on GitHub ↗

Remove user session.

(self, user_id)

Source from the content-addressed store, hash-verified

215 return {"status": "ok", "session": session}
216
217 def logout(self, user_id):
218 """Remove user session."""
219 key = f"user:{user_id}"
220 if stash.exists("sessions", key):
221 stash.delete("sessions", key)
222 self._increment_counter()
223 return {"status": "logged_out", "user_id": user_id}
224 return {"status": "not_found", "user_id": user_id}
225
226 def get_session(self, user_id):
227 """Get user session - visible from any worker."""

Callers

nothing calls this directly

Calls 3

_increment_counterMethod · 0.95
existsMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected