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

Function callback

src/notification-service/consumer.py:9–14  ·  view source on GitHub ↗
(ch, method, properties, body)

Source from the content-addressed store, hash-verified

7 channel = connection.channel()
8
9 def callback(ch, method, properties, body):
10 err = email.notification(body)
11 if err:
12 ch.basic_nack(delivery_tag=method.delivery_tag)
13 else:
14 ch.basic_ack(delivery_tag=method.delivery_tag)
15
16 channel.basic_consume(
17 queue=os.environ.get("MP3_QUEUE"), on_message_callback=callback

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected