This commit is contained in:
Louis Vézina 2020-01-30 10:36:33 -05:00
parent 091f9270fb
commit 21fe339d3f
1 changed files with 14 additions and 21 deletions

View File

@ -68,17 +68,11 @@ class DaemonStatus(ProcessRegistry):
remaining_processes.remove(ep)
else:
if remaining_time > 0:
if PY3:
try:
ep.wait(remaining_time)
remaining_processes.remove(ep)
except sp.TimeoutExpired:
pass
else:
'''
In python 2 there is no such thing as some mechanism to wait with a timeout.
'''
time.sleep(1)
elapsed = time.time() - reference_ts
remaining_time = timeout - elapsed
return remaining_processes
@ -168,7 +162,6 @@ if __name__ == '__main__':
should_stop = lambda: False
if PY3:
daemonStatus = DaemonStatus()
def shutdown():