mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:04:58 +00:00
fix process control bug
This commit is contained in:
parent
ef48f8be47
commit
0a0800fe63
@ -3,6 +3,7 @@
|
||||
import sh
|
||||
import sys
|
||||
import signal
|
||||
import Queue
|
||||
|
||||
|
||||
def run_job(sema, child_q, manager_q, provider):
|
||||
@ -56,7 +57,7 @@ def run_job(sema, child_q, manager_q, provider):
|
||||
if msg == "terminate":
|
||||
manager_q.put((provider.name, "QUIT"))
|
||||
break
|
||||
except:
|
||||
except Queue.Empty:
|
||||
pass
|
||||
|
||||
|
||||
|
@ -207,10 +207,7 @@ class TUNASync(object):
|
||||
signal.signal(signal.SIGUSR2, self.reload_mirrors_force)
|
||||
|
||||
while 1:
|
||||
try:
|
||||
name, status = self.channel.get()
|
||||
except:
|
||||
continue
|
||||
name, status = self.channel.get()
|
||||
|
||||
if status == "QUIT":
|
||||
print("New configuration applied to {}".format(name))
|
||||
|
Loading…
x
Reference in New Issue
Block a user