Commit afdc8322 authored by Andreas Valder's avatar Andreas Valder

added option to disable scheduler

parent e2a5c38b
......@@ -30,3 +30,4 @@ LDAP_GROUPS = ['fachschaft']
ERROR_PAGE = 'static/500.html'
RWTH_IP_RANGES = ['134.130.0.0/16', '137.226.0.0/16', '134.61.0.0/16', '192.35.229.0/24', '2a00:8a60::/32']
FSMPI_IP_RANGES = ['137.226.35.192/29', '137.226.75.0/27', '137.226.127.32/27', '137.226.231.192/26', '134.130.102.0/26' ]
DISABLE_SCHEDULER = False
......@@ -27,5 +27,5 @@ def sched_func(delay, priority=0, firstdelay=None, args=[], kargs={}):
print("Scheduler: registered {} (frequency 1/{}s, start delay: {}s)".format(func.__name__, delay, firstdelay))
return func
return wrapper
threading.Thread(target=run_scheduler, daemon=True).start()
if not app.config['DISABLE_SCHEDULER']:
threading.Thread(target=run_scheduler, daemon=True).start()
......@@ -35,6 +35,7 @@ if sys.argv[0].endswith('tests.py'):
config['SQLITE_INIT_DATA'] = True
config['SQLITE_INIT_SCHEMA'] = True
config['DEBUG'] = True
config['DISABLE_SCHEDULER'] = True
if config['DEBUG']:
app.jinja_env.auto_reload = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment