Automatically delete clones after N hours of inactivity
Goal
When a clone is inactive during N hours (should be configurable; default: 2), it has to be destroyed unless it is marked as "protected from deletion".
"Inactive" here means:
- no new connections,
- no SQL requests.
"during N hours" here means "at least N hours". It may be several minutes more. N is "global" for Database Lab instance.
TODO / How to implement
On a separate note, do we need to tell the user somehow (in Database Lab API responses?) what is the current value of N?
Acceptance criteria
As a user, I know that if I don't use a clone, it will be deleted after N hours. I also know that if I mark it "protected" it will never get deleted.
Edited by Anna