MainTransServer/app/beat_schedule.py

12 lines
337 B
Python

# app/beat_schedule.py
from celery.schedules import crontab
beat_schedule = {
"delete-old-files-every-10-mins": {
"task": "app.tasks.delete_old_files",
"schedule": crontab(minute="*/10"),
"args": ("/app/images", 1800), # 30분 이상된 파일 삭제
}
}
# celery_app.conf.beat_schedule = beat_schedule