mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 13:18:35 +00:00
Merge pull request #455 from sartography/feature/disable_scheduled_tasks_in_config
Disable Scheduled Tasks in Development Mode (if desired).
This commit is contained in:
commit
4615fcbae8
@ -97,4 +97,7 @@ MAIL_USERNAME = environ.get('MAIL_USERNAME', default='')
|
||||
MAIL_PASSWORD = environ.get('MAIL_PASSWORD', default='')
|
||||
|
||||
# Local file path
|
||||
SYNC_FILE_ROOT = environ.get('SYNC_FILE_ROOT', default='tests/data/IMPORT_TEST')
|
||||
SYNC_FILE_ROOT = environ.get('SYNC_FILE_ROOT', default='tests/data/IMPORT_TEST')
|
||||
|
||||
# Turn on/off processing waiting tasks
|
||||
PROCESS_WAITING_TASKS = environ.get('PROCESS_WAITING_TASKS', default='true')
|
||||
|
@ -65,9 +65,9 @@ def process_waiting_tasks():
|
||||
|
||||
@app.before_first_request
|
||||
def init_scheduler():
|
||||
scheduler.add_job(process_waiting_tasks, 'interval', minutes=1)
|
||||
# scheduler.add_job(FileService.cleanup_file_data, 'interval', minutes=1440) # once a day
|
||||
scheduler.start()
|
||||
if app.config['PROCESS_WAITING_TASKS']:
|
||||
scheduler.add_job(process_waiting_tasks, 'interval', minutes=1)
|
||||
scheduler.start()
|
||||
|
||||
|
||||
# Convert list of allowed origins to list of regexes
|
||||
|
Loading…
x
Reference in New Issue
Block a user