aws-samples / amazon-sagemaker-codeserver

Hosting code-server on Amazon SageMaker
MIT No Attribution
52 stars 17 forks source link

👋🏾 Is it possible to find active notebooks and terminals on code-server? #31

Open vas610 opened 1 year ago

vas610 commented 1 year ago

Is there any API that can be used to find notebooks and terminals that are active on the code-server? In that way, it can be used when setting up a lifecycle config for SageMaker Notebook to auto stop when there is not activity.

giuseppeporcelli commented 1 year ago

Hi @vas610, you can try using the healthz endpoint and the heartbeat logic that code-server provides. I suggest reading: https://coder.com/docs/code-server/latest/FAQ#what-is-the-healthz-endpoint