This commit is contained in:
Administrator
2022-08-16 10:06:15 +03:00
parent 1f505ce1c7
commit 2b21b169be
4 changed files with 77 additions and 105 deletions

View File

@@ -48,7 +48,10 @@ class MessagingSupport(BaseCommand):
while True:
try:
with pika.BlockingConnection(
pika.ConnectionParameters(host=settings.RABBIT_HOST)
pika.ConnectionParameters(
host=settings.RABBIT_HOST,
credentials=pika.PlainCredentials('guest', settings.RABBIT_PASSWORD)
)
) as connection:
channel = connection.channel()
channel.queue_declare(queue=self.queue_name)