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

DM-48885: Add support for configuring number of messages to be consumed and timeout in salobj Remote/SalInfo. #309

Merged
merged 9 commits into from
Feb 12, 2025

Conversation

tribeiro
Copy link
Member

No description provided.

Copy link
Contributor

@wvreeven wvreeven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

f"Failed to deserialize {schema_resolution_errors[kafka_name]} samples of "
f"{kafka_name}. Check schema compatibility!"
for message in messages:
message_error = message.error()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping message processing leads to quite big indentation, which makes code harder to read. Can you please create a method to process messages, so the code (assuming it's called _process_message) will shrink to:

for message in messages:
    self._process_messaeg(message)

@@ -0,0 +1,40 @@
Recording Changes
=================

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an empty space. Not a big deal, but if you can get rid of those (:%s/ *$//g in vim), that will save some bits.

…xpose parameters to allow users to select the number of messages and timeout.

By default this uses num_messages=1 and timeout=0.1, which fallbacks to the behaviour of pool with timeout=0.1.

Users must be careful when using this feature as it will affect command and event response in some non-obvious way.
@tribeiro tribeiro merged commit 7b6a140 into develop Feb 12, 2025
3 checks passed
@tribeiro tribeiro deleted the tickets/DM-48885 branch February 12, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants