-
Notifications
You must be signed in to change notification settings - Fork 19
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
base: python2
Are you sure you want to change the base?
Conversation
…en a message cannot be delivered immediately to a queue
…arnings to the logs for every time it fails.
motorway/messages.py
Outdated
|
||
queue.send_string( | ||
self.as_json(), | ||
flags=zmq.backend.cython.constants.NOBLOCK # Raise and exception if the queue is full. |
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.
Typo in comment "and" -> "an"
motorway/mixins.py
Outdated
message_retries = 0 | ||
while True: | ||
try: | ||
message.send( |
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.
Don't think we're doing 80 chars here, so no point to do a new line here, I guess?
@KristianOellegaard I would prefer if you will also take a look |
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