fix shutdown

This commit is contained in:
j 2015-11-18 01:27:53 +01:00
commit 26da12dedd
5 changed files with 29 additions and 6 deletions

View file

@ -119,13 +119,13 @@ def run():
def shutdown():
if state.downloads:
state.downloads.join()
if state.tasks:
state.tasks.join()
if state.nodes:
state.nodes.join()
if state.scraping:
state.scraping.join()
http_server.stop()
if state.tasks:
state.tasks.join()
if PID and os.path.exists(PID):
os.unlink(PID)