From cb00b4cdda278e9261f621eed8ceecc5e4a0e389 Mon Sep 17 00:00:00 2001 From: Adrien Chabod Date: Fri, 27 Oct 2023 11:18:47 +0200 Subject: [PATCH] - Improved RabbitMQ host configuration for Taiga events and asynchronous tasks. - Utilized environment variables with default values for RabbitMQ hosts. - Updated Taiga events RabbitMQ host configuration to use the environment variable `TAIGA_EVENTS_RABBITMQ_HOST`, with a default value of 'taiga-events-rabbitmq'. - Revised asynchronous tasks RabbitMQ host configuration to use the environment variable `TAIGA_ASYNC_RABBITMQ_HOST`, with a default value of 'taiga-async-rabbitmq'. This enhancement provides more flexibility in configuring RabbitMQ hosts for Taiga events and asynchronous tasks. Utilizing environment variables allows for easy customization, and default values ensure seamless deployment with minimal configuration. --- docker/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/config.py b/docker/config.py index b44e577f..8383f256 100644 --- a/docker/config.py +++ b/docker/config.py @@ -89,7 +89,7 @@ EVENTS_PUSH_BACKEND_URL = os.getenv('EVENTS_PUSH_BACKEND_URL') if not EVENTS_PUSH_BACKEND_URL: - EVENTS_PUSH_BACKEND_URL = f"amqp://{ os.getenv('RABBITMQ_USER') }:{ os.getenv('RABBITMQ_PASS') }@taiga-events-rabbitmq:5672/taiga" + EVENTS_PUSH_BACKEND_URL = f"amqp://{ os.getenv('RABBITMQ_USER') }:{ os.getenv('RABBITMQ_PASS') }@{ os.getenv('TAIGA_EVENTS_RABBITMQ_HOST', 'taiga-events-rabbitmq') }:5672/taiga" EVENTS_PUSH_BACKEND_OPTIONS = { "url": EVENTS_PUSH_BACKEND_URL @@ -104,7 +104,7 @@ CELERY_BROKER_URL = os.getenv('CELERY_BROKER_URL') if not CELERY_BROKER_URL: - CELERY_BROKER_URL = f"amqp://{ os.getenv('RABBITMQ_USER') }:{ os.getenv('RABBITMQ_PASS') }@taiga-async-rabbitmq:5672/taiga" + CELERY_BROKER_URL = f"amqp://{ os.getenv('RABBITMQ_USER') }:{ os.getenv('RABBITMQ_PASS') }@{ os.getenv('TAIGA_ASYNC_RABBITMQ_HOST', 'taiga-async-rabbitmq') }:5672/taiga" CELERY_RESULT_BACKEND = None # for a general installation, we don't need to store the results CELERY_ACCEPT_CONTENT = ['pickle', ] # Values are 'pickle', 'json', 'msgpack' and 'yaml'