-
Notifications
You must be signed in to change notification settings - Fork 17
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
Small debugging enhancements #1119
Conversation
20b0e3d
to
94d72a8
Compare
request_receiver=channel.new_receiver( | ||
limit=_REQUEST_RECV_BUFFER_SIZE, name=channel.name + " Receiver" | ||
), |
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.
Wait! This shouldn't be necessary. Maybe you are using name
directly? If you use str(receiver)
or repr(receiver)
the channel name (and the word "receiver") will be already used:
- https://github.com/frequenz-floss/frequenz-channels-python/blob/b3c98e594310edde687bde4d9b39f4ac370ed676/src/frequenz/channels/_broadcast.py#L472-L483
- https://github.com/frequenz-floss/frequenz-channels-python/blob/b3c98e594310edde687bde4d9b39f4ac370ed676/src/frequenz/channels/_broadcast.py#L291-L303
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 was using .name directly, yes
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.
Removed
src/frequenz/sdk/microgrid/_data_sourcing/microgrid_api_source.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
Easier to read & compare, especially when debugging. Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
5a4e391
to
80197eb
Compare
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 except for the DEBUG
-> WARNING
. Feel free to force-merge after it is fixed.
minimum_relevant_timestamp: Minimum timestamp that was requested | ||
timestamp: Timestamp that was requested | ||
""" | ||
if not _logger.isEnabledFor(logging.DEBUG): |
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 should be WARNING
!
if not _logger.isEnabledFor(logging.DEBUG): | |
if not _logger.isEnabledFor(logging.WARNING): |
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.
Shit. So much for my FCR deployment.
Signed-off-by: Mathias L. Baumann <[email protected]>
Signed-off-by: Mathias L. Baumann <[email protected]>
Sample