mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 06:52:59 +00:00
run pre-commit hook
This commit is contained in:
@@ -850,11 +850,11 @@ class BaseHandler(RequestHandler):
|
||||
SERVER_SPAWN_DURATION_SECONDS.labels(
|
||||
status=ServerSpawnStatus.success
|
||||
).observe(time.perf_counter() - spawn_start_time)
|
||||
self.eventlog.record_event('hub.jupyter.org/server-action', 1, {
|
||||
'action': 'start',
|
||||
'username': user.name,
|
||||
'servername': server_name
|
||||
})
|
||||
self.eventlog.record_event(
|
||||
'hub.jupyter.org/server-action',
|
||||
1,
|
||||
{'action': 'start', 'username': user.name, 'servername': server_name},
|
||||
)
|
||||
proxy_add_start_time = time.perf_counter()
|
||||
spawner._proxy_pending = True
|
||||
try:
|
||||
@@ -1035,11 +1035,15 @@ class BaseHandler(RequestHandler):
|
||||
SERVER_STOP_DURATION_SECONDS.labels(
|
||||
status=ServerStopStatus.success
|
||||
).observe(toc - tic)
|
||||
self.eventlog.record_event('hub.jupyter.org/server-action', 1, {
|
||||
self.eventlog.record_event(
|
||||
'hub.jupyter.org/server-action',
|
||||
1,
|
||||
{
|
||||
'action': 'stop',
|
||||
'username': user.name,
|
||||
'servername': server_name
|
||||
})
|
||||
'servername': server_name,
|
||||
},
|
||||
)
|
||||
except:
|
||||
SERVER_STOP_DURATION_SECONDS.labels(
|
||||
status=ServerStopStatus.failure
|
||||
|
Reference in New Issue
Block a user