summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-10-19 04:34:59 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-10-19 04:34:59 +0300
commitff63326524dce75d7c1d00c2ead12f1ecb691524 (patch)
tree67b5a9534422cfdbab018730f53a87aa15da8b33
parent741727bc2228bfe24deb62bb3e6041211bec37eb (diff)
ipcam_server: fix
-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