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)
|
await init_lock(ScheduleJobLocker.REFRESH_SHAREPOINT_CONTENT_JOB_LOCKER)
|
||||||
scheduler.add_job(refresh_sharepoint_content_job, "interval", seconds=(3600 + 3))
|
scheduler.add_job(refresh_sharepoint_content_job, "interval", seconds=(3600 + 3))
|
||||||
# Register cleanup_document_job as a one-time job
|
# Register cleanup_document_job as a one-time job
|
||||||
await init_lock(ScheduleJobLocker.CLEANUP_DOCUMENT_JOB_LOCKER)
|
# This job is just one-time job for removing many unused documents
|
||||||
execution_time = datetime.now() + timedelta(
|
# Run already, now comment it out
|
||||||
seconds=60
|
# await init_lock(ScheduleJobLocker.CLEANUP_DOCUMENT_JOB_LOCKER)
|
||||||
) # Schedule to run 60 seconds from now
|
# execution_time = datetime.now() + timedelta(
|
||||||
scheduler.add_job(
|
# seconds=60
|
||||||
cleanup_document_job, # Job function
|
# ) # Schedule to run 60 seconds from now
|
||||||
trigger=DateTrigger(run_date=execution_time), # One-time trigger
|
# scheduler.add_job(
|
||||||
id="cleanup_document_one_time", # Optional: Give the job an ID
|
# 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