-
Couldn't load subscription status.
- Fork 20
Remove request_timeout parameter from propose_power methods
#1000
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
Conversation
Signed-off-by: Sahas Subramanian <[email protected]>
request_timeout parameter from propose_power methodsrequest_timeout parameter from propose_power methods
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.
LGTM, just a suggestion to improve documentation, as I'm not sure what would be the effect of changing the timeout or what happens when the timeout is reached.
| Args: | ||
| resampler_config: Config to pass on to the resampler. | ||
| api_power_request_timeout: Timeout to use when making power requests to | ||
| the microgrid API. |
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.
Maybe it would be good to document what happens if it times out? As a user I'm not sure what to do with this. Why should I increase or decrease the timeout?
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've added a few more lines. The only thing is that I've not been specific about the exact duration for which the components get blocked, because currently it is hard-coded to exponentially increase from 1s to a max of 30s when there are subsequent timeouts.
I think we don't have to provide a way to change the duration until we can do so from the UI.
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.
LGTM too, only the suggestion from Luca needs to be checked/addressed
Signed-off-by: Sahas Subramanian <[email protected]>
Signed-off-by: Sahas Subramanian <[email protected]>
Signed-off-by: Sahas Subramanian <[email protected]>
Before the power manager was introduced, the
request_timeoutparameter was used to specify a different timeout for theset_powercalls made to the api service.The
propose_powermethod is much more high level and it no longer makes sense to provide arequest_timeoutparameter, because it could conflict with other proposals and it would be hard to figure out which timeout to use.From now on, it may be specified at application startup, through the new optional
api_power_request_timeoutparameter in themicrogrid.initialize()method.