HealthView'da status kod qo'shildi; RabbitMQ ulanishi qo'shildi; .gitignore yaratildi.

This commit is contained in:
A'zamov Samandar
2025-04-21 19:53:10 +05:00
parent 5a38d016a8
commit 80fa39bd1b
9 changed files with 83 additions and 20 deletions

17
test.py
View File

@@ -1,17 +0,0 @@
from kombu import Connection, Exchange, Producer
# RabbitMQ ulanishi
rabbit_url = 'amqp://guest:guest@127.0.0.1:5672/'
connection = Connection(rabbit_url)
channel = connection.channel()
exchange = Exchange('notification', type='direct')
# Producer yaratish
producer = Producer(channel, exchange=exchange, routing_key="notification")
# Xabar yuborish
message = {'type': 'sms', 'message': "classcom.uz sayti va mobil ilovasiga ro'yxatdan o'tishingingiz uchun tasdiqlash kodi: 1234", "to": ["+998888112309", "+998943990509"]}
producer.publish(message)
print("Message sent to all workers!")