From ff63326524dce75d7c1d00c2ead12f1ecb691524 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 19 Oct 2022 04:34:59 +0300 Subject: ipcam_server: fix --- src/ipcam_server.py | 7 ++++--- 1 file 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 -- cgit v1.2.3