Make project work with Podman

This commit is contained in:
2024-12-28 13:20:55 +00:00
parent 6d9c78d2e1
commit 6ccf84be26
6 changed files with 144 additions and 53 deletions

View File

@@ -38,11 +38,15 @@ class Command(BaseCommand):
log.debug(f"Scheduling checking process job every {INTERVAL} seconds")
scheduler.add_job(job, "interval", seconds=INTERVAL)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
scheduler._eventloop = loop
scheduler.start()
loop = asyncio.get_event_loop()
try:
loop.run_forever()
except (KeyboardInterrupt, SystemExit):
log.info("Process terminating")
finally:
scheduler.shutdown(wait=False)
loop.close()