diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -314,14 +314,12 @@ allow_custom_hooks_settings = True #################################### use_celery = false -broker.host = localhost -broker.vhost = rabbitmqhost -broker.port = 5672 -broker.user = rabbitmq -broker.password = qweqwe + +## Example: connect to the virtual host 'rabbitmqhost' on localhost as rabbitmq: +broker.url = amqp://rabbitmq:qewqew@localhost:5672/rabbitmqhost celery.imports = kallithea.lib.celerylib.tasks - +celery.accept.content = pickle celery.result.backend = amqp celery.result.dburi = amqp:// celery.result.serialier = json @@ -330,11 +328,9 @@ celery.result.serialier = json #celery.amqp.task.result.expires = 18000 celeryd.concurrency = 2 -#celeryd.log.file = celeryd.log -celeryd.log.level = DEBUG celeryd.max.tasks.per.child = 1 -## tasks will never be sent to the queue, but executed locally instead. +## If true, tasks will never be sent to the queue, but executed locally instead. celery.always.eager = false #################################### diff --git a/kallithea/bin/template.ini.mako b/kallithea/bin/template.ini.mako --- a/kallithea/bin/template.ini.mako +++ b/kallithea/bin/template.ini.mako @@ -311,14 +311,12 @@ allow_custom_hooks_settings = True <%text>#################################### use_celery = false -broker.host = localhost -broker.vhost = rabbitmqhost -broker.port = 5672 -broker.user = rabbitmq -broker.password = qweqwe + +<%text>## Example: connect to the virtual host 'rabbitmqhost' on localhost as rabbitmq: +broker.url = amqp://rabbitmq:qewqew@localhost:5672/rabbitmqhost celery.imports = kallithea.lib.celerylib.tasks - +celery.accept.content = pickle celery.result.backend = amqp celery.result.dburi = amqp:// celery.result.serialier = json @@ -327,11 +325,9 @@ celery.result.serialier = json #celery.amqp.task.result.expires = 18000 celeryd.concurrency = 2 -#celeryd.log.file = celeryd.log -celeryd.log.level = DEBUG celeryd.max.tasks.per.child = 1 -<%text>## tasks will never be sent to the queue, but executed locally instead. +<%text>## If true, tasks will never be sent to the queue, but executed locally instead. celery.always.eager = false <%text>#################################### diff --git a/kallithea/config/deployment.ini_tmpl b/kallithea/config/deployment.ini_tmpl --- a/kallithea/config/deployment.ini_tmpl +++ b/kallithea/config/deployment.ini_tmpl @@ -307,14 +307,12 @@ allow_custom_hooks_settings = True #################################### use_celery = false -broker.host = localhost -broker.vhost = rabbitmqhost -broker.port = 5672 -broker.user = rabbitmq -broker.password = qweqwe + +## Example: connect to the virtual host 'rabbitmqhost' on localhost as rabbitmq: +broker.url = amqp://rabbitmq:qewqew@localhost:5672/rabbitmqhost celery.imports = kallithea.lib.celerylib.tasks - +celery.accept.content = pickle celery.result.backend = amqp celery.result.dburi = amqp:// celery.result.serialier = json @@ -323,11 +321,9 @@ celery.result.serialier = json #celery.amqp.task.result.expires = 18000 celeryd.concurrency = 2 -#celeryd.log.file = celeryd.log -celeryd.log.level = DEBUG celeryd.max.tasks.per.child = 1 -## tasks will never be sent to the queue, but executed locally instead. +## If true, tasks will never be sent to the queue, but executed locally instead. celery.always.eager = false #################################### diff --git a/kallithea/lib/celerypylons/loader.py b/kallithea/lib/celerypylons/loader.py --- a/kallithea/lib/celerypylons/loader.py +++ b/kallithea/lib/celerypylons/loader.py @@ -7,7 +7,7 @@ from pylons import config to_pylons = lambda x: x.replace('_', '.').lower() to_celery = lambda x: x.replace('.', '_').upper() -LIST_PARAMS = """CELERY_IMPORTS ADMINS ROUTES""".split() +LIST_PARAMS = """CELERY_IMPORTS ADMINS ROUTES CELERY_ACCEPT_CONTENT""".split() class PylonsSettingsProxy(object): diff --git a/kallithea/tests/test.ini b/kallithea/tests/test.ini --- a/kallithea/tests/test.ini +++ b/kallithea/tests/test.ini @@ -316,14 +316,12 @@ allow_custom_hooks_settings = True #################################### use_celery = false -broker.host = localhost -broker.vhost = rabbitmqhost -broker.port = 5672 -broker.user = rabbitmq -broker.password = qweqwe + +## Example: connect to the virtual host 'rabbitmqhost' on localhost as rabbitmq: +broker.url = amqp://rabbitmq:qewqew@localhost:5672/rabbitmqhost celery.imports = kallithea.lib.celerylib.tasks - +celery.accept.content = pickle celery.result.backend = amqp celery.result.dburi = amqp:// celery.result.serialier = json @@ -332,11 +330,9 @@ celery.result.serialier = json #celery.amqp.task.result.expires = 18000 celeryd.concurrency = 2 -#celeryd.log.file = celeryd.log -celeryd.log.level = DEBUG celeryd.max.tasks.per.child = 1 -## tasks will never be sent to the queue, but executed locally instead. +## If true, tasks will never be sent to the queue, but executed locally instead. celery.always.eager = false ####################################