summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/ipcam_server.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipcam_server.py b/src/ipcam_server.py
index 79b4c54..07b216b 100755
--- a/src/ipcam_server.py
+++ b/src/ipcam_server.py
@@ -498,11 +498,12 @@ if __name__ == '__main__':
loop = asyncio.get_event_loop()
try:
+ scheduler = AsyncIOScheduler(event_loop=loop)
if config['fix_enabled']:
- scheduler = AsyncIOScheduler(event_loop=loop)
scheduler.add_job(fix_job, 'interval', seconds=config['fix_interval'])
- scheduler.add_job(cleanup_job, 'interval', seconds=config['cleanup_interval'])
- scheduler.start()
+
+ scheduler.add_job(cleanup_job, 'interval', seconds=config['cleanup_interval'])
+ scheduler.start()
except KeyError:
pass