jupyterhub / jupyterhub-deploy-teaching

Reference deployment of JupyterHub and nbgrader on a single server
http://jupyterhub-deploy-teaching.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
246 stars 85 forks source link

cull-idle as a Hub service doesn't work #108

Closed eosantigen closed 4 years ago

eosantigen commented 4 years ago

Bug description

I have followed exactly the steps here .

Expected behaviour

When the relevant seconds pass as defined in the jupyterhubconfig.py , the cull-idle service should stop the idle server of each user. So that when going to navigate the page, no terminals should be able to be started, no notebooks etc, unless the user explicitly presses Start server . (am I wrong?)_

Actual behaviour

When the relevant seconds pass, all that happens is this output in the log: 200 GET /hub/api/users (cull-idle@127.0.0.1) 10.47ms And with this the server continues running normally, meaning I can start a terminal, make files etc.

Your personal set up

import sys
c.JupyterHub.last_activity_interval = 300
c.GenericOAuthenticator.auth_refresh_age = 800
c.JupyterHub.shutdown_on_logout = True
from oauthenticator.generic import GenericOAuthenticator
c.JupyterHub.authenticator_class = GenericOAuthenticator
c.Authenticator.enable_auth_state = True
c.LocalGenericOAuthenticator.refresh_pre_spawn = True
c.LocalGenericOAuthenticator.pre_spawn_start

c.JupyterHub.services = [{
    'name': 'cull-idle',
    'admin': True,
    'command': [sys.executable, '/home/elena/cull_idle_servers.py', '--timeout=600'],
    }
]

Running as root .