unblock select loop during reload of a sync worker

When reloading the worker canbe in the select loop and it will wait until timeout before handling any change. So make sure to wake up the loop before going further.
This commit is contained in:
benoitc 2019-11-22 14:09:20 +01:00
parent 8a270c9329
commit f9ade3af34

View File

@ -123,6 +123,7 @@ class Worker(object):
def changed(fname):
self.log.info("Worker reloading: %s modified", fname)
self.alive = False
os.write(self.PIPE[1], b"1")
self.cfg.worker_int(self)
time.sleep(0.1)
sys.exit(0)