Skip to content
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

WIP: Controller for low demand times #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mschnepf
Copy link
Member

@mschnepf mschnepf commented Oct 4, 2021

This PR addresses issue #83. This controller should test the demand for resources in time intervals. Between these tests, demand should be zero to reduce the number of unnecessary resources.

@mschnepf mschnepf added the enhancement New feature or request label Oct 4, 2021
@mschnepf mschnepf self-assigned this Oct 4, 2021
@maxfischer2781
Copy link
Member

Hi @mschnepf, how is this coming along? Do you need any input on it?

@mschnepf
Copy link
Member Author

Thanks for questioning.

I think the current code does basically its job (set demand to zero for a while). I'm not sure about the implementation, especially how to manage the time during the demand=0 period. Maybe it is better to use a await trio.sleep(self.test_intermission). However, in that implementation, there will be no logging output during the demand=0 period. With the current implementation, every self.interval seconds, a logging output is produced. Are there comments about the implementation of the demand=0 period?

Furthermore, unit-tests are on my todo-list :-)

@maxfischer2781
Copy link
Member

I think it's fine not to log anything while the controller is waiting. After all, it's not actually doing anything then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants