Skip to content

Commit

Permalink
Update celery_app/utils/fire_event.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
amindadgar and coderabbitai[bot] authored Jun 26, 2024
1 parent 57d5aca commit de9ca16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion celery_app/utils/fire_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ def job_send(event: str, queue_name: str, content: dict[str, Any]) -> None:
content=content,
)
logging.info("Published to RabbitMQ!")
rabbit_mq.connection.close()
try:
rabbit_mq.connection.close()
except Exception as e:
logging.error(f"Failed to close RabbitMQ connection: {e}")

0 comments on commit de9ca16

Please sign in to comment.