parmentelat / nbhosting

nginx + django + docker architecture to host notebooks embedded from open-edx hosted MOOCs
Other
71 stars 8 forks source link

leverage jupyter5 last_activity field #4

Closed parmentelat closed 7 years ago

parmentelat commented 7 years ago

With jupyter-5.0, we can now get a much more accurate perception on usage of the various kernels:

root@thermals /nbhosting/jupyter # curl http://localhost:33422/api/kernels?token=flotpython-x-mary
[{"execution_state": "idle", 
  "id": "a39df33d-f791-4d34-b945-7c480255793f", 
  "name": "python2", "connections": 1,
  "last_activity": "2017-04-06T08:20:57.152974Z"}]

Use this to

parmentelat commented 7 years ago

the code in monitor.py does this now turns out that right now it does not show because I have, rather stupidly, changed the naming scheme for the containers, and monitor uses that scheme to filter out non nbh- containers