mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-16 03:42:20 +02:00
Preserve preview harness, editor, email and task improvements
Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
This commit is contained in:
@@ -612,13 +612,16 @@ class SessionManager:
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
def delete_session(self, session_id: str) -> bool:
|
||||
def delete_session(self, session_id: str, *, delete_images: bool = False) -> bool:
|
||||
"""Permanently delete a session and all its messages."""
|
||||
db = SessionLocal()
|
||||
try:
|
||||
try:
|
||||
from src.session_image_cleanup import cleanup_session_images
|
||||
cleanup_session_images(session_id, db=db)
|
||||
from src.session_image_cleanup import cleanup_session_images, preserve_session_images
|
||||
if delete_images:
|
||||
cleanup_session_images(session_id, db=db)
|
||||
else:
|
||||
preserve_session_images(session_id, db=db)
|
||||
except Exception as e:
|
||||
logger.warning(f"Image cleanup failed while deleting session {session_id}: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user