run pre-commit hook

This commit is contained in:
Min RK
2019-09-19 15:51:02 +02:00
parent 949d8d0bfa
commit ac32ae496e
7 changed files with 20 additions and 17 deletions

View File

@@ -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