use global, kinda ugly but ehhh...

This commit is contained in:
əlemi 2021-12-17 16:39:27 +01:00
parent 2acabbfb8d
commit 890f080dbc

View file

@ -17,12 +17,17 @@ class Runnable:
await self.stop(force=True)
def run(self):
global DONE
global FORCE_QUIT
logging.info("Starting process")
DONE = asyncio.Event()
FORCE_QUIT = asyncio.Event()
def signal_handler(signum, __):
global DONE
global FORCE_QUIT
if signum == SIGINT:
if DONE.is_set():
logging.info("Received SIGINT, terminating")