mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-30 19:02:34 +00:00
WIP
This commit is contained in:
parent
091f9270fb
commit
21fe339d3f
1 changed files with 14 additions and 21 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue