This commit is contained in:
anhduy-tech
2026-02-04 21:01:54 +07:00
parent f297a5e1b4
commit 5b360753d8
11 changed files with 552 additions and 204 deletions

View File

@@ -156,7 +156,7 @@ def start():
Khởi động APScheduler và thêm tác vụ quét job.
"""
scheduler = BackgroundScheduler(timezone='Asia/Ho_Chi_Minh')
# Chạy tác vụ quét job mỗi 60 giây
scheduler.add_job(scan_and_run_due_jobs, 'interval', seconds=60, id='scan_due_jobs_job', replace_existing=True)
# Chạy tác vụ quét job mỗi 5 giây
scheduler.add_job(scan_and_run_due_jobs, 'interval', seconds=5, id='scan_due_jobs_job', replace_existing=True)
scheduler.start()
#logger.info("APScheduler started... Jobs will be scanned every 60 seconds.")
#logger.info("APScheduler started... Jobs will be scanned every 5 seconds.")