Commit 8c872962 authored by Federico Sismondi's avatar Federico Sismondi
Browse files

define custom AmqpSynchCallTimeoutError instead of using py3-dependent TimeoutError

parent 4f0849d3
......@@ -7,10 +7,14 @@ try:
except:
from .messages import *
VERSION = '0.0.6'
VERSION = '0.0.7'
AMQP_EXCHANGE = 'amq.topic'
class AmqpSynchCallTimeoutError(Exception):
pass
def publish_message(connection, message):
"""
Publishes message into the correct topic (uses Message object metadata)
......@@ -95,7 +99,7 @@ def amqp_request(connection, request_message, component_id):
else:
# clean up
channel.queue_delete(reply_queue_name)
raise TimeoutError(
raise AmqpSynchCallTimeoutError(
"Response timeout! rkey: %s , request type: %s" % (
request_message.routing_key,
request_message._type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment