reanahub / reana-server

REANA API server
http://reana-server.readthedocs.io/
MIT License
5 stars 37 forks source link

api: prevent sessions from start if the user exceeds quota #283

Closed diegodelemos closed 4 years ago

diegodelemos commented 4 years ago

With the outcome of https://github.com/reanahub/reana-server/issues/282 we should be able to add this prevention mechanism to the session opening endpoint.

tiborsimko commented 4 years ago

Interesting side problems: (a) how to measure the CPU of open, yet inactive notebooks (total time?) and (b) how to warn the user (inject headers into notebook? send email that this notebook will be closed soon?).

alintulu commented 4 years ago

Tested similarly as mentioned here.

$ reana-client open jupyter -w serial
Interactive session could not be opened: 
User quota exceeded.

Works as expected!