No project description provided
Project description
jupyterhub-idle-culler provides a JupyterHub service to cull and shut down idle notebook servers and users on a JupyterHub deployment.
Setup
As a hub managed service
In jupyterhub_config.py, add the following dictionary for the idle-culler Service to the c.JupyterHub.services list:
c.JupyterHub.services = [
{
'name': 'idle-culler',
'admin': True,
'command': [
sys.executable,
'-m', 'jupyterhub-idle-culler,
'--timeout=3600'
],
}
]
where:
'admin': True indicates that the Service requires admin permissions so it can shut down arbitrary user notebooks, and
'command' indicates that the Service will be managed by the Hub.
As a standalone script
jupyterhub-idle-culler can also be run as a standalone script. It can access the hub’s api with a service token. The service token must have admin privileges.
Generate an API token and store it in a JUPYTERHUB_API_TOKEN environment variable. Then start jupyterhub-idle-culler manually
export JUPYTERHUB_API_TOKEN=$(jupyterhub token)
python3 -m jupyterhub-idle-culler[--timeout=900] [--url=http://localhost:8081/hub/api]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for jupyterhub-idle-culler-1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9e58baa48cba6a79b83c43d8dcab7b758a66c2c4a9bc8394f7b43e03d891621 |
|
MD5 | 36dde3014a39bb83a7921b61c2a69d51 |
|
BLAKE2b-256 | 70a4ce13655fb327005d0b0765d2b94a173970b896d8f24604239ae66d7cc333 |