Skip to content

Commit

Permalink
Merge pull request #4197 from magfest/config_update_west2022
Browse files Browse the repository at this point in the history
Config update west2022
  • Loading branch information
bitbyt3r authored Aug 3, 2023
2 parents bec7fb6 + 4ff6c5b commit 9abad53
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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 @@ -23,4 +23,8 @@ fpdf==1.7.2
boto3==1.14.45
SQLAlchemy==1.3.0
Jinja2==2.11.3
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}"
6 changes: 5 additions & 1 deletion uber/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
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)

def celery_on_startup(fn, *args, **kwargs):
celery.conf.beat_startup_tasks.append((celery.task(fn), args, kwargs))
Expand Down

0 comments on commit 9abad53

Please sign in to comment.