mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 22:43:00 +00:00
more logging during cleanup
This commit is contained in:
@@ -854,14 +854,22 @@ class JupyterHub(Application):
|
|||||||
for user in self.db.query(orm.User):
|
for user in self.db.query(orm.User):
|
||||||
if user.spawner is not None:
|
if user.spawner is not None:
|
||||||
futures.append(user.stop())
|
futures.append(user.stop())
|
||||||
|
else:
|
||||||
|
self.log.info("Leaving single-user servers running")
|
||||||
|
|
||||||
# clean up proxy while SUS are shutting down
|
# clean up proxy while SUS are shutting down
|
||||||
if self.cleanup_proxy and self.proxy_process and self.proxy_process.poll() is None:
|
if self.cleanup_proxy:
|
||||||
self.log.info("Cleaning up proxy[%i]...", self.proxy_process.pid)
|
if self.proxy_process and self.proxy_process.poll() is None:
|
||||||
try:
|
self.log.info("Cleaning up proxy[%i]...", self.proxy_process.pid)
|
||||||
self.proxy_process.terminate()
|
try:
|
||||||
except Exception as e:
|
self.proxy_process.terminate()
|
||||||
self.log.error("Failed to terminate proxy process: %s", e)
|
except Exception as e:
|
||||||
|
self.log.error("Failed to terminate proxy process: %s", e)
|
||||||
|
else:
|
||||||
|
self.log.info("I didn't start the proxy, I can't clean it up")
|
||||||
|
else:
|
||||||
|
self.log.info("Leaving proxy running")
|
||||||
|
|
||||||
|
|
||||||
# wait for the requests to stop finish:
|
# wait for the requests to stop finish:
|
||||||
for f in futures:
|
for f in futures:
|
||||||
|
Reference in New Issue
Block a user