Added more stuff to results

This commit is contained in:
2021-06-14 03:12:44 +02:00
parent a64b14b06f
commit 07689594b3
3 changed files with 27 additions and 18 deletions

View File

@@ -22,11 +22,12 @@ def message_callback(channel, method, properties, body):
with start_transaction(op="cnn-classification-service", name="classify-soundfile"):
results = MagicDoer.run_everything(msg) # <- This is where the magic happens
channel.basic_publish(
exchange=os.environ['PIKA_OUTPUT_EXCHANGE'],
routing_key='classification-result',
body=json.dumps(results).encode("utf-8")
)
if results:
channel.basic_publish(
exchange=os.environ['PIKA_OUTPUT_EXCHANGE'],
routing_key='classification-result',
body=json.dumps(results).encode("utf-8")
)
def main():