diff --git a/celery_app/utils/fire_event.py b/celery_app/utils/fire_event.py index d975384..1cf7830 100644 --- a/celery_app/utils/fire_event.py +++ b/celery_app/utils/fire_event.py @@ -37,3 +37,7 @@ def job_send(event: str, queue_name: str, content: dict[str, Any]) -> None: content=content, ) logging.info("Published to RabbitMQ!") + try: + rabbit_mq.connection.close() + except Exception as e: + logging.error(f"Failed to close RabbitMQ connection: {e}")