Can i provide jupyterhub-idle-culler-service values from options_form?

I would like to make it possible for users to set the --max-age seconds. I already provide a c.Spawner.options_form and my issue is I can’t see how it’s possible to get the user_options set in c.Spawner.options_form into c.JupyterHub.services for the idle-culler-service to consume.

Is there any way I can achieve this?

Many thanks

The idle culler runs as a central privileged service (as opposed to one service per user pod), so it’s not possible to pass user options.

However Jupyter Server has the ability to shut itself down, see ServerApp.shutdown_no_activity_timeout in
https://jupyter-server.readthedocs.io/en/latest/other/full-config.html

This post is a good explanation of the difference between the two, though some of the information is out of date:

The idle-culler doesn’t operate on this information, but it is available in the information retrieved, as server["user_options"]. So a slightly customized idle culler could choose to take this information into account. I think it would be hard to add generic support to the public idle culler package, though.

2 Likes