changeset 8269:e1d4a0d8520f

celery: use celery 4 setting names in generated .ini files
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 13 Feb 2020 14:46:50 +0100
parents f8f50d3b6512
children 5725fa4cfecd
files development.ini kallithea/lib/paster_commands/template.ini.mako
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/development.ini	Thu Feb 20 02:03:24 2020 +0100
+++ b/development.ini	Thu Feb 13 14:46:50 2020 +0100
@@ -253,18 +253,20 @@
 ## Note: Celery doesn't support Windows.
 use_celery = false
 
+## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'.
+
 ## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':
-broker.url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
+celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
 
 celery.result.backend = db+sqlite:///celery-results.db
 
 #celery.amqp.task.result.expires = 18000
 
-celeryd.concurrency = 2
-celeryd.max.tasks.per.child = 1
+celery.worker_concurrency = 2
+celery.worker_max_tasks_per_child = 1
 
 ## If true, tasks will never be sent to the queue, but executed locally instead.
-celery.always.eager = false
+celery.task_always_eager = false
 
 ####################################
 ###         BEAKER CACHE        ####
--- a/kallithea/lib/paster_commands/template.ini.mako	Thu Feb 20 02:03:24 2020 +0100
+++ b/kallithea/lib/paster_commands/template.ini.mako	Thu Feb 13 14:46:50 2020 +0100
@@ -359,18 +359,20 @@
 <%text>## Note: Celery doesn't support Windows.</%text>
 use_celery = false
 
+<%text>## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'.</%text>
+
 <%text>## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':</%text>
-broker.url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
+celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
 
 celery.result.backend = db+sqlite:///celery-results.db
 
 #celery.amqp.task.result.expires = 18000
 
-celeryd.concurrency = 2
-celeryd.max.tasks.per.child = 1
+celery.worker_concurrency = 2
+celery.worker_max_tasks_per_child = 1
 
 <%text>## If true, tasks will never be sent to the queue, but executed locally instead.</%text>
-celery.always.eager = false
+celery.task_always_eager = false
 
 <%text>####################################</%text>
 <%text>###         BEAKER CACHE        ####</%text>