Skip to content

Commit

Permalink
- Improved RabbitMQ host configuration for Taiga events and asynchron…
Browse files Browse the repository at this point in the history
…ous 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.
  • Loading branch information
Adrien Chabod authored and bameda committed Apr 3, 2024
1 parent d564852 commit cb00b4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down

0 comments on commit cb00b4c

Please sign in to comment.