Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display "Time to cull" in notebook UI #839

Open
betatim opened this issue May 2, 2019 · 2 comments
Open

Display "Time to cull" in notebook UI #839

betatim opened this issue May 2, 2019 · 2 comments

Comments

@betatim
Copy link
Member

betatim commented May 2, 2019

Is there a way we could make a small extension that displays a (lower bound) on how much time is left till the kernel/binder instance gets culled?

I think think this would be a good way to make people aware that culling is happening and how long they have left. They'd probably also learn fairly quickly which actions lead to the timer being reset. Some of the negative experiences people have with Binder is because they don't know or forget about the culling. So as a little surprise after putting in effort they lose all their work.

@minrk
Copy link
Member

minrk commented May 2, 2019

It can be a little tricky to retrieve this information inside the container, especially since it's a vanilla notebook, not a jupyterhub-singleuser instance.

The most direct way is to query the jupyterhub api's last_activity data. This is what's actually used for culling most of the time. However, it's only updated every ~5 minutes.

The second way is to use the notebook's internal last_activity tracking used for its self-culling (I think we should move toward relying on this in general, and push the external culler to be only a fallback and for enforcing max-age, for #831 among other reasons). This should work pretty reliably, but may not always match up with the values truly used in the external culler.

@betatim
Copy link
Member Author

betatim commented May 2, 2019

If we use the internal culling to feed this "time to cull" display do we get a lower bound (for all sensibly configured external cullers)? I was thinking that if we know the last activity timestamp and know the cull timeout then a piece of JS can show (an estimate of) the time remaining.

(I need to read #831 a few more times to really understand it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants