mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
Merge pull request #4870 from minrk/metrics-start
start metrics collector in start
This commit is contained in:
@@ -3414,7 +3414,6 @@ class JupyterHub(Application):
|
|||||||
metrics_collector = self.metrics_collector = PeriodicMetricsCollector(
|
metrics_collector = self.metrics_collector = PeriodicMetricsCollector(
|
||||||
parent=self, db=self.db
|
parent=self, db=self.db
|
||||||
)
|
)
|
||||||
metrics_collector.start()
|
|
||||||
|
|
||||||
async def cleanup(self):
|
async def cleanup(self):
|
||||||
"""Shutdown managed services and various subprocesses. Cleanup runtime files."""
|
"""Shutdown managed services and various subprocesses. Cleanup runtime files."""
|
||||||
@@ -3643,6 +3642,9 @@ class JupyterHub(Application):
|
|||||||
loop.stop()
|
loop.stop()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# start collecting metrics
|
||||||
|
self.metrics_collector.start()
|
||||||
|
|
||||||
# start the proxy
|
# start the proxy
|
||||||
if self.proxy.should_start:
|
if self.proxy.should_start:
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user