修改mq的服务器

This commit is contained in:
zayac 2024-02-29 20:42:57 +08:00
parent ad316cf596
commit cf607d071f
2 changed files with 4 additions and 4 deletions

View File

@ -3,9 +3,9 @@ import pika
class MessageClient:
def __init__(self):
self.credentials = pika.PlainCredentials('bot', 'xiaomi123')
self.credentials = pika.PlainCredentials('bot', 'xiaomi@123')
self.connection = pika.BlockingConnection(
pika.ConnectionParameters('164.155.224.131', 5672, '/', credentials=self.credentials))
pika.ConnectionParameters('45.89.233.249', 5672, '/', credentials=self.credentials))
self.channel = self.connection.channel()
self.channel.queue_declare(queue='message_queue')

View File

@ -32,9 +32,9 @@ def _send_message_to_user(bot_token, target_id, message):
class MessageServer:
def __init__(self):
self.credentials = pika.PlainCredentials('bot', 'xiaomi123')
self.credentials = pika.PlainCredentials('bot', 'xiaom@i123')
self.connection = pika.BlockingConnection(
pika.ConnectionParameters('164.155.224.131', 5672, '/', credentials=self.credentials))
pika.ConnectionParameters('45.89.233.249', 5672, '/', credentials=self.credentials))
self.channel = self.connection.channel()
self.channel.queue_declare(queue='message_queue')