republish valid cookie
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import pika
|
||||
|
||||
QUEUE_HOST = "appointment.lpaconsulting.fr"
|
||||
REQUEST_DATA_QUEUE = 'REQUEST_DATA'
|
||||
credentials = pika.PlainCredentials('appointment', 'ZyuhJZ2xEYWhElhpJjy7YEpZGZwNYJz2fHIu')
|
||||
|
||||
|
||||
class CookiesPublisher:
|
||||
|
||||
def __init__(self):
|
||||
self.connection = None
|
||||
self.channel = None
|
||||
|
||||
def set_up_connection(self):
|
||||
self.connection = pika.BlockingConnection(
|
||||
pika.ConnectionParameters(host=QUEUE_HOST, port=5672, credentials=credentials))
|
||||
self.channel = self.connection.channel()
|
||||
# self.channel.queue_declare(queue=REQUEST_DATA_QUEUE, durable=True)
|
||||
|
||||
def publish_body(self, body: str):
|
||||
self.channel.basic_publish(exchange='', routing_key=REQUEST_DATA_QUEUE, body=body)
|
||||
Reference in New Issue
Block a user