Skip to content

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"

message_retries = 0
while True:
try:
message.send(
Copy link
Contributor

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?

@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.

4 participants