Skip to content

Commit

Permalink
Merge pull request #4196 from magfest/config_update_west2023
Browse files Browse the repository at this point in the history
Config update west2023
  • Loading branch information
bitbyt3r authored Aug 3, 2023
2 parents 4f7f373 + 4013702 commit 32ec8a3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ ENV DEFAULT_URL=/uber
ENV DEBUG=false
ENV SESSION_HOST=redis
ENV SESSION_PORT=6379
ENV SESSION_PREFIX=uber
ENV BROKER_PROTOCOL=amqp
ENV BROKER_HOST=rabbitmq
ENV BROKER_PORT=5672
ENV BROKER_USER=celery
Expand Down
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ Jinja2==2.11.3
requests==2.27.1
signnow_python_sdk==2.0.1
Authlib==1.0.1
pyyaml==6.0
requests==2.27.1
signnow_python_sdk==2.0.1
Authlib==1.0.1
pyyaml==6.0
librabbitmq==2.0.0
1 change: 1 addition & 0 deletions sideboard-development.ini.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ server.socket_timeout = 1
server.thread_pool = 100
tools.sessions.host = "${SESSION_HOST}"
tools.sessions.port = ${SESSION_PORT}
tools.sessions.prefix = "${SESSION_PREFIX}"
tools.sessions.storage_type = "redis"
tools.sessions.timeout = 60

Expand Down
2 changes: 1 addition & 1 deletion uber-development.ini.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ hostname = "${HOSTNAME}"
url_root = "http://${HOSTNAME}:${PORT}"

[secret]
broker_url = "amqp://${BROKER_USER}:${BROKER_PASS}@${BROKER_HOST}:${BROKER_PORT}/${BROKER_VHOST}"
broker_url = "${BROKER_PROTOCOL}://${BROKER_USER}:${BROKER_PASS}@${BROKER_HOST}:${BROKER_PORT}/${BROKER_VHOST}"
8 changes: 7 additions & 1 deletion uber/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
celery.conf.beat_schedule = {}
celery.conf.beat_startup_tasks = []
celery.conf.update(config_dict['celery'])
celery.conf.update(broker_url=config_dict['secret']['broker_url'])

broker_url = config_dict['secret']['broker_url']

celery.conf.update(broker_url=broker_url)
celery.conf.update(result_backend=broker_url.replace("amqps://", "rpc://"))
celery.conf.update(task_ignore_result=True)

celery.conf.update(result_backend=config_dict['secret']['broker_url'].replace("amqp://", "rpc://"))
celery.conf.update(task_ignore_result=True)

Expand Down

0 comments on commit 32ec8a3

Please sign in to comment.