mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-08 02:24:08 +00:00
run pre-commit hook
This commit is contained in:
@@ -4,5 +4,5 @@
|
|||||||
alabaster_jupyterhub
|
alabaster_jupyterhub
|
||||||
recommonmark==0.5.0
|
recommonmark==0.5.0
|
||||||
sphinx-copybutton
|
sphinx-copybutton
|
||||||
|
sphinx-jsonschema
|
||||||
sphinx>=1.7
|
sphinx>=1.7
|
||||||
sphinx-jsonschema
|
|
@@ -19,7 +19,7 @@ extensions = [
|
|||||||
'sphinx.ext.napoleon',
|
'sphinx.ext.napoleon',
|
||||||
'autodoc_traits',
|
'autodoc_traits',
|
||||||
'sphinx_copybutton',
|
'sphinx_copybutton',
|
||||||
'sphinx-jsonschema'
|
'sphinx-jsonschema',
|
||||||
]
|
]
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
@@ -47,4 +47,4 @@ Event schemas
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
server-actions.rst
|
server-actions.rst
|
||||||
|
@@ -1 +1 @@
|
|||||||
.. jsonschema:: ../../../jupyterhub/event-schemas/server-actions/v1.yaml
|
.. jsonschema:: ../../../jupyterhub/event-schemas/server-actions/v1.yaml
|
||||||
|
@@ -5,19 +5,19 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import atexit
|
import atexit
|
||||||
import binascii
|
import binascii
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import json
|
|
||||||
from glob import glob
|
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from datetime import timezone
|
from datetime import timezone
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from getpass import getuser
|
from getpass import getuser
|
||||||
|
from glob import glob
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
@@ -2073,7 +2073,7 @@ class JupyterHub(Application):
|
|||||||
internal_ssl_ca=self.internal_ssl_ca,
|
internal_ssl_ca=self.internal_ssl_ca,
|
||||||
trusted_alt_names=self.trusted_alt_names,
|
trusted_alt_names=self.trusted_alt_names,
|
||||||
shutdown_on_logout=self.shutdown_on_logout,
|
shutdown_on_logout=self.shutdown_on_logout,
|
||||||
eventlog=self.eventlog
|
eventlog=self.eventlog,
|
||||||
)
|
)
|
||||||
# allow configured settings to have priority
|
# allow configured settings to have priority
|
||||||
settings.update(self.tornado_settings)
|
settings.update(self.tornado_settings)
|
||||||
@@ -2109,7 +2109,6 @@ class JupyterHub(Application):
|
|||||||
continue
|
continue
|
||||||
self.eventlog.register_schema_file(os.path.join(dirname, file))
|
self.eventlog.register_schema_file(os.path.join(dirname, file))
|
||||||
|
|
||||||
|
|
||||||
def write_pid_file(self):
|
def write_pid_file(self):
|
||||||
pid = os.getpid()
|
pid = os.getpid()
|
||||||
if self.pid_file:
|
if self.pid_file:
|
||||||
|
@@ -850,11 +850,11 @@ class BaseHandler(RequestHandler):
|
|||||||
SERVER_SPAWN_DURATION_SECONDS.labels(
|
SERVER_SPAWN_DURATION_SECONDS.labels(
|
||||||
status=ServerSpawnStatus.success
|
status=ServerSpawnStatus.success
|
||||||
).observe(time.perf_counter() - spawn_start_time)
|
).observe(time.perf_counter() - spawn_start_time)
|
||||||
self.eventlog.record_event('hub.jupyter.org/server-action', 1, {
|
self.eventlog.record_event(
|
||||||
'action': 'start',
|
'hub.jupyter.org/server-action',
|
||||||
'username': user.name,
|
1,
|
||||||
'servername': server_name
|
{'action': 'start', 'username': user.name, 'servername': server_name},
|
||||||
})
|
)
|
||||||
proxy_add_start_time = time.perf_counter()
|
proxy_add_start_time = time.perf_counter()
|
||||||
spawner._proxy_pending = True
|
spawner._proxy_pending = True
|
||||||
try:
|
try:
|
||||||
@@ -1035,11 +1035,15 @@ class BaseHandler(RequestHandler):
|
|||||||
SERVER_STOP_DURATION_SECONDS.labels(
|
SERVER_STOP_DURATION_SECONDS.labels(
|
||||||
status=ServerStopStatus.success
|
status=ServerStopStatus.success
|
||||||
).observe(toc - tic)
|
).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',
|
'action': 'stop',
|
||||||
'username': user.name,
|
'username': user.name,
|
||||||
'servername': server_name
|
'servername': server_name,
|
||||||
})
|
},
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
SERVER_STOP_DURATION_SECONDS.labels(
|
SERVER_STOP_DURATION_SECONDS.labels(
|
||||||
status=ServerStopStatus.failure
|
status=ServerStopStatus.failure
|
||||||
|
@@ -3,6 +3,7 @@ async_generator>=1.8
|
|||||||
certipy>=0.1.2
|
certipy>=0.1.2
|
||||||
entrypoints
|
entrypoints
|
||||||
jinja2
|
jinja2
|
||||||
|
jupyter_telemetry
|
||||||
oauthlib>=3.0
|
oauthlib>=3.0
|
||||||
pamela
|
pamela
|
||||||
prometheus_client>=0.0.21
|
prometheus_client>=0.0.21
|
||||||
@@ -11,4 +12,3 @@ requests
|
|||||||
SQLAlchemy>=1.1
|
SQLAlchemy>=1.1
|
||||||
tornado>=5.0
|
tornado>=5.0
|
||||||
traitlets>=4.3.2
|
traitlets>=4.3.2
|
||||||
jupyter_telemetry
|
|
||||||
|
Reference in New Issue
Block a user