Skip to content

Commit

Permalink
use env var for idle culler instead of patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mathematicalmichael committed Aug 28, 2022
1 parent f889dae commit bca832c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ DOCKER_SPAWN_CMD=start-singleuser.sh
USERNAME=`whoami`
PASSWORD_LENGTH=6
HUB_LOC=`pwd`

CULL_IDLE=false
30 changes: 0 additions & 30 deletions disable-culler.patch

This file was deleted.

24 changes: 13 additions & 11 deletions jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,17 @@ def mount_config_files(self, username='jovyan'):
db=HUB_NAME,
)


# https://github.com/jupyterhub/jupyterhub-idle-culler
c.JupyterHub.services = [
{
"name": "jupyterhub-idle-culler-service",
"command": [
sys.executable,
"-m", "jupyterhub_idle_culler",
"--timeout=3600",
],
"admin": True,
}
]
if os.environ['CULL_IDLE']:
c.JupyterHub.services = [
{
"name": "jupyterhub-idle-culler-service",
"command": [
sys.executable,
"-m", "jupyterhub_idle_culler",
"--timeout=3600",
],
"admin": True,
}
]

0 comments on commit bca832c

Please sign in to comment.