MCPcopy Create free account
hub / github.com/N4si/microservices-python-app / callback

Function callback

src/converter-service/consumer.py:20–25  ·  view source on GitHub ↗
(ch, method, properties, body)

Source from the content-addressed store, hash-verified

18 channel = connection.channel()
19
20 def callback(ch, method, properties, body):
21 err = to_mp3.start(body, fs_videos, fs_mp3s, ch)
22 if err:
23 ch.basic_nack(delivery_tag=method.delivery_tag)
24 else:
25 ch.basic_ack(delivery_tag=method.delivery_tag)
26
27 channel.basic_consume(
28 queue=os.environ.get("VIDEO_QUEUE"), on_message_callback=callback

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected