mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
reorder server init
So the Hub private interface isn't the last thing logged, which caused lots of confusion.
This commit is contained in:
@@ -982,6 +982,16 @@ class JupyterHub(Application):
|
|||||||
loop.stop()
|
loop.stop()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# start the webserver
|
||||||
|
self.http_server = tornado.httpserver.HTTPServer(self.tornado_application, xheaders=True)
|
||||||
|
try:
|
||||||
|
self.http_server.listen(self.hub_port, address=self.hub_ip)
|
||||||
|
except Exception:
|
||||||
|
self.log.error("Failed to bind hub to %s", self.hub.server.bind_url)
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
self.log.info("Hub API listening on %s", self.hub.server.bind_url)
|
||||||
|
|
||||||
# start the proxy
|
# start the proxy
|
||||||
try:
|
try:
|
||||||
yield self.start_proxy()
|
yield self.start_proxy()
|
||||||
@@ -1003,16 +1013,7 @@ class JupyterHub(Application):
|
|||||||
pc = PeriodicCallback(self.update_last_activity, 1e3 * self.last_activity_interval)
|
pc = PeriodicCallback(self.update_last_activity, 1e3 * self.last_activity_interval)
|
||||||
pc.start()
|
pc.start()
|
||||||
|
|
||||||
# start the webserver
|
self.log.info("JupyterHub is now running at %s", self.proxy.public_server.url)
|
||||||
self.http_server = tornado.httpserver.HTTPServer(self.tornado_application, xheaders=True)
|
|
||||||
try:
|
|
||||||
self.http_server.listen(self.hub_port, address=self.hub_ip)
|
|
||||||
except Exception:
|
|
||||||
self.log.error("Failed to bind hub to %s" % self.hub.server.bind_url)
|
|
||||||
raise
|
|
||||||
else:
|
|
||||||
self.log.info("Hub API listening on %s" % self.hub.server.bind_url)
|
|
||||||
|
|
||||||
# register cleanup on both TERM and INT
|
# register cleanup on both TERM and INT
|
||||||
atexit.register(self.atexit)
|
atexit.register(self.atexit)
|
||||||
self.init_signal()
|
self.init_signal()
|
||||||
|
Reference in New Issue
Block a user