Comment out the cleanup_document_job
This commit is contained in:
parent
55e19f3f11
commit
8cae70a21f
@ -20,12 +20,14 @@ async def register_job(scheduler):
|
||||
await init_lock(ScheduleJobLocker.REFRESH_SHAREPOINT_CONTENT_JOB_LOCKER)
|
||||
scheduler.add_job(refresh_sharepoint_content_job, "interval", seconds=(3600 + 3))
|
||||
# Register cleanup_document_job as a one-time job
|
||||
await init_lock(ScheduleJobLocker.CLEANUP_DOCUMENT_JOB_LOCKER)
|
||||
execution_time = datetime.now() + timedelta(
|
||||
seconds=60
|
||||
) # Schedule to run 60 seconds from now
|
||||
scheduler.add_job(
|
||||
cleanup_document_job, # Job function
|
||||
trigger=DateTrigger(run_date=execution_time), # One-time trigger
|
||||
id="cleanup_document_one_time", # Optional: Give the job an ID
|
||||
)
|
||||
# This job is just one-time job for removing many unused documents
|
||||
# Run already, now comment it out
|
||||
# await init_lock(ScheduleJobLocker.CLEANUP_DOCUMENT_JOB_LOCKER)
|
||||
# execution_time = datetime.now() + timedelta(
|
||||
# seconds=60
|
||||
# ) # Schedule to run 60 seconds from now
|
||||
# scheduler.add_job(
|
||||
# cleanup_document_job, # Job function
|
||||
# trigger=DateTrigger(run_date=execution_time), # One-time trigger
|
||||
# id="cleanup_document_one_time", # Optional: Give the job an ID
|
||||
# )
|
||||
|
||||
Loading…
Reference in New Issue
Block a user