Fix the cleanup task

This commit is contained in:
2025-10-22 22:38:15 +03:00
Unverified
parent 1e5099ec90
commit aafc87bb7e
2 changed files with 8 additions and 2 deletions
+8
View File
@@ -51,6 +51,14 @@ async def lifespan(app: FastAPI):
except Exception as e:
logger.error(f"Failed to ensure owner verification: {e}")
# Start the messaging cleanup task
try:
from routes.messaging import messagingManager
messagingManager.start_cleanup_task()
logger.info("Messaging cleanup task started")
except Exception as e:
logger.error(f"Failed to start messaging cleanup task: {e}")
yield
# Shutdown (if needed in the future)