Skip to content

Commit

Permalink
Merge pull request #76 from TogetherCrew/fix/72-memory-leak
Browse files Browse the repository at this point in the history
fix: closing rabbitMQ connection!
  • Loading branch information
amindadgar authored Jun 26, 2024
2 parents 361b486 + de9ca16 commit 83ff554
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions celery_app/utils/fire_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

0 comments on commit 83ff554

Please sign in to comment.