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

View File

@@ -0,0 +1,15 @@
# rabbitmq.py
from kombu import Connection
rabbit_url = 'amqp://guest:guest@rabbitmq:5672/'
_connection = None
def get_connection():
global _connection
if _connection is None or not _connection.connected:
_connection = Connection(rabbit_url)
_connection.ensure_connection(max_retries=3)
return _connection