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

Log warnings when internal queue is full #31

Open
wants to merge 5 commits into
base: python2
Choose a base branch
from

Conversation

SuneKjaergaard
Copy link
Contributor

Switch from using a blocking call to add messages to the queue, to a using a call that will raise an exception if the message cannot be delivered instantaneously. this gives us the option to log warnings when a queue is full


queue.send_string(
self.as_json(),
flags=zmq.backend.cython.constants.NOBLOCK # Raise and exception if the queue is full.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in comment "and" -> "an"

motorway/mixins.py Show resolved Hide resolved
message_retries = 0
while True:
try:
message.send(
Copy link
Member

Choose a reason for hiding this comment

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

Don't think we're doing 80 chars here, so no point to do a new line here, I guess?

motorway/tests/utils.py Show resolved Hide resolved
@SuneKjaergaard
Copy link
Contributor Author

@KristianOellegaard I would prefer if you will also take a look

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