This commit is contained in:
@@ -62,8 +62,8 @@ class SampleResource(Resource):
|
||||
break
|
||||
|
||||
with opentracing.tracer.start_active_span('publishMetaMessage'):
|
||||
try: # TODO change exchange
|
||||
magic_amqp.publish(
|
||||
try:
|
||||
magic_amqp.publish_meta(
|
||||
{
|
||||
'tag': generated_tag,
|
||||
'timestamp': datetime.now().isoformat(),
|
||||
@@ -84,8 +84,11 @@ class SampleResource(Resource):
|
||||
|
||||
# Announce only after the data is successfully committed
|
||||
with opentracing.tracer.start_active_span('publishInCacheMessage'):
|
||||
try: # TODO change exchange
|
||||
magic_amqp.publish({'tag': generated_tag})
|
||||
try:
|
||||
magic_amqp.publish_cache({
|
||||
'tag': generated_tag,
|
||||
'mime_type': soundfile.mimetype
|
||||
})
|
||||
except Exception as e:
|
||||
current_app.logger.exception(e)
|
||||
return abort(500, f"AMQP Publish error: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user