-
Notifications
You must be signed in to change notification settings - Fork 0
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
#33 Added configurable idle time for a SaaS database #36
Conversation
parser.addoption( | ||
"--idle-time", | ||
action="store", | ||
default="2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mean we could have a minimum idle time of 1h. Couldn't there be cases where we want to have a shorter idle-time, maybe 30min or so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, it's a float, 30 min is 0.5.
Secondly, I don't see cases when we need to set it to a shot period. The database fixture is supposed to shut down the database as soon as all tests are done. Unless we want to keep the database to investigate the effect of our tests. In that case, we probably want to give ourselves enough time for investigation and then shut down the db manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering about whether we should rename the CLI option.
I think --idle-time
is very unspecific, it should say something about the semantics of the idle duration:
- which component is affected, in this case is clear I think: the SaaS databse instance
- what will happen after the timeout, i.e. an autostop
- especially the unit should be clear, AFAIK @ahsimb chose hours which also deviates from the unit minutes in the original SaaS API.
In saas-api-python/.../init.py the constant is called AUTOSTOP_DEFAULT_IDLE_TIME
with datatype timedelta
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal:
- change to unit minutes
- use name
--autostop-idle-minutes
for CLI option
parser.addoption( | ||
"--idle-time", | ||
action="store", | ||
default="2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering about whether we should rename the CLI option.
I think --idle-time
is very unspecific, it should say something about the semantics of the idle duration:
- which component is affected, in this case is clear I think: the SaaS databse instance
- what will happen after the timeout, i.e. an autostop
- especially the unit should be clear, AFAIK @ahsimb chose hours which also deviates from the unit minutes in the original SaaS API.
In saas-api-python/.../init.py the constant is called AUTOSTOP_DEFAULT_IDLE_TIME
with datatype timedelta
.
@ckunki, how about Hours are better than minutes (which, in turn, better than seconds and milliseconds). |
OK, the ticket got more complicated than originally thought. Back to the drawing board. |
Please ignore my previous comment. I decided to do the follow-up development in a separate PR. |
parser.addoption( | ||
"--idle-time", | ||
action="store", | ||
default="2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal:
- change to unit minutes
- use name
--autostop-idle-minutes
for CLI option
closes #33