From 9adf48821d655f6aeff669296183d4f7a0378c41 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 26 Aug 2018 05:07:54 -0400 Subject: [PATCH] Add a celery setting namespace. Signed-off-by: Roberto Rosario --- mayan/apps/common/settings.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/mayan/apps/common/settings.py b/mayan/apps/common/settings.py index f70179073a..75411d447b 100644 --- a/mayan/apps/common/settings.py +++ b/mayan/apps/common/settings.py @@ -241,3 +241,26 @@ setting_django_databases = namespace.add_setting( 'DATA_UPLOAD_MAX_MEMORY_SIZE.' ), ) + +namespace = Namespace(name='celery', label=_('Celery')) + +setting_celery_broker_url = namespace.add_setting( + global_name='BROKER_URL', default=settings.BROKER_URL, + help_text=_( + 'Default: "amqp://". Default broker URL. This must be a URL in ' + 'the form of: transport://userid:password@hostname:port/virtual_host ' + 'Only the scheme part (transport://) is required, the rest is ' + 'optional, and defaults to the specific transports default values.' + ), +) + +setting_celery_result_backend = namespace.add_setting( + global_name='CELERY_RESULT_BACKEND', + default=settings.CELERY_RESULT_BACKEND, + help_text=_( + 'Default: No result backend enabled by default. The backend used ' + 'to store task results (tombstones). Refer to ' + 'http://docs.celeryproject.org/en/v4.1.0/userguide/configuration.' + 'html#result-backend' + ) +)