repospace / scripts /cleanup_ttl.py
2Btainment's picture
Initial RepoSpace MVP: FastAPI + constrained sandbox + React UI
3c07134 verified
Raw History Blame Contribute Delete
473 Bytes
#!/usr/bin/env python3
"""Manual TTL cleanup helper (also runs inside the app loop)."""
from __future__ import annotations
import asyncio
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
from backend.app.services.sessions import session_manager # noqa: E402
async def main() -> None:
await session_manager.cleanup_expired()
print("cleanup done")
if __name__ == "__main__":
asyncio.run(main())