level12 / keg-app-cookiecutter

0 stars 0 forks source link

Deployed app config file does not use celery.config.celery_config() #138

Open rsyring opened 3 years ago

rsyring commented 3 years ago

But it should. See example config for usage.

Deployed config: https://github.com/level12/keg-app-cookiecutter/blob/e625bb677360962136a3089a75ce1282496d29da/%7B%7Bcookiecutter.project_dashed%7D%7D-src/ansible/files/%7B%7Bcookiecutter.project_namespace%7D%7D-config.py#L23 Example config: https://github.com/level12/keg-app-cookiecutter/blob/e625bb677360962136a3089a75ce1282496d29da/%7B%7Bcookiecutter.project_dashed%7D%7D-src/%7B%7Bcookiecutter.project_namespace%7D%7D-config-example.py#L28

rsyring commented 3 years ago

While we are doing this, we should also extend celery_config() to accept **kwargs and set worker_max_tasks_per_child=2000 as a default (instead of setting it in the deployed config only).

rsyring commented 2 years ago

I removed all the ansible variables and put the string we use in development in. :man_facepalming:

rsyring commented 2 years ago

    CELERY = celery_config(
        broker_url='amqp://{{ app_rabbitmq_user }}:{{ app_rabbitmq_pass|urlencode() }}'
        '@localhost:5672/{{ app_rabbitmq_vhost }}'
    )