Add file cleanup to the scheduler

This commit is contained in:
mike cullerton 2021-09-30 14:11:33 -04:00
parent cc0b7853e3
commit f44b9836ce
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ ma = Marshmallow(app)
from crc import models
from crc import api
from crc.api import admin
from crc.services.file_service import FileService
from crc.services.workflow_service import WorkflowService
connexion_app.add_api('api.yml', base_path='/v1.0')
@ -56,6 +57,7 @@ def process_waiting_tasks():
WorkflowService.do_waiting()
scheduler.add_job(process_waiting_tasks,'interval',minutes=1)
scheduler.add_job(FileService.cleanup_file_data, 'interval', minutes=1440) # once a day
scheduler.start()