people-reading/backend/app/cli.py
2026-05-11 23:26:11 +08:00

16 lines
384 B
Python

import asyncio
from app.core.database import AsyncSessionLocal, init_db
from app.services.cleanup_service import cleanup_expired_images
async def main() -> None:
await init_db()
async with AsyncSessionLocal() as session:
count = await cleanup_expired_images(session)
print(f"cleaned {count} expired images")
if __name__ == "__main__":
asyncio.run(main())