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