downloader: Start backdoor later so workers is in locals

pull/40/head
Mike Lang 6 years ago committed by Mike Lang
parent 86da9d9fe8
commit df66553b38

@ -563,12 +563,13 @@ def main(channels, base_dir=".", qualities="source", metrics_port=8001, backdoor
common.install_stacksampler()
prom.start_http_server(metrics_port)
if backdoor_port:
gevent.backdoor.BackdoorServer(('127.0.0.1', backdoor_port), locals=locals()).start()
logging.info("Starting up")
workers = [gevent.spawn(manager.run) for manager in managers]
if backdoor_port:
gevent.backdoor.BackdoorServer(('127.0.0.1', backdoor_port), locals=locals()).start()
# Wait for any to die
gevent.wait(workers, count=1)
# If one has stopped, either:

Loading…
Cancel
Save