cleanly shut down
This commit is contained in:
parent
9ecf102c01
commit
4b790722ae
6 changed files with 37 additions and 14 deletions
|
|
@ -92,4 +92,14 @@ def run():
|
|||
host = settings.server['address']
|
||||
url = 'http://%s:%s/' % (host, settings.server['port'])
|
||||
print 'open browser at %s' % url
|
||||
state.main.start()
|
||||
try:
|
||||
state.main.start()
|
||||
except:
|
||||
print 'shutting down...'
|
||||
|
||||
if state.downloads:
|
||||
state.downloads.join()
|
||||
if state.tasks:
|
||||
state.tasks.join()
|
||||
if state.nodes:
|
||||
state.nodes.join()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue