Clean up empty sessions
(self)
| 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""" |
no test coverage detected