fix: pika version 1.3.2

- When tested with most recent pika's version 1.3.2, spec didn't exists. Found pika.DeliveryMode.Persistent instead.
This commit is contained in:
Marcelo Ferrão Feodrippe 2023-12-07 05:44:30 -03:00 committed by GitHub
parent 81bb7d347c
commit 8497c5f6e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ channel.basic_publish(
routing_key='task_queue',
body=message,
properties=pika.BasicProperties(
delivery_mode=pika.spec.PERSISTENT_DELIVERY_MODE,
delivery_mode=pika.DeliveryMode.Persistent,
))
print(f" [x] Sent {message}")
connection.close()