MCPcopy
hub / github.com/PromtEngineer/localGPT / handle_cleanup_sessions

Method handle_cleanup_sessions

backend/server.py:190–201  ·  view source on GitHub ↗

Clean up empty sessions

(self)

Source from the content-addressed store, hash-verified

188 }, status_code=500)
189
190 def handle_cleanup_sessions(self):
191 """Clean up empty sessions"""
192 try:
193 cleanup_count = db.cleanup_empty_sessions()
194 self.send_json_response({
195 "message": f"Cleaned up {cleanup_count} empty sessions",
196 "cleanup_count": cleanup_count
197 })
198 except Exception as e:
199 self.send_json_response({
200 "error": f"Failed to cleanup sessions: {str(e)}"
201 }, status_code=500)
202
203 def handle_get_session(self, session_id: str):
204 """Get a specific session with its messages"""

Callers 1

do_GETMethod · 0.95

Calls 2

send_json_responseMethod · 0.95

Tested by

no test coverage detected