Files
fastapi-best-architecture/backend/app/task/tasks/db_log/tasks.py
T
Wu Clan 5762834744 Update the ruff rules and format the code (#846)
* Update the ruff rules and format the code

* Update the per-file-ignores

* Update the ci

* Update rules

* Fix codes

* Fix pagination

* Update rules
2025-10-10 19:02:49 +08:00

19 lines
502 B
Python

from celery import shared_task
from backend.app.admin.service.login_log_service import login_log_service
from backend.app.admin.service.opera_log_service import opera_log_service
@shared_task
async def delete_db_opera_log() -> str:
"""自动删除数据库操作日志"""
await opera_log_service.delete_all()
return 'Success'
@shared_task
async def delete_db_login_log() -> str:
"""自动删除数据库登录日志"""
await login_log_service.delete_all()
return 'Success'