From ee248d24defeaac0ff9f31cf8060cd9b4ce6cca4 Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Tue, 7 Nov 2017 11:53:53 +0100 Subject: [PATCH] Allow overriding celery list params The condition 'if key in LIST_PARAMS' was never satisfied because config keys are lower case and LIST_PARAMS is upper case. This allow overriding the CELERY_IMPORTS, ADMINS and ROUTES in ckan config. Also overriding list params should extend existings values (i.e. for CELERY_IMPORTS) --- ckan/lib/celery_app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ckan/lib/celery_app.py b/ckan/lib/celery_app.py index d89dae8a8a2..050db9a41f4 100644 --- a/ckan/lib/celery_app.py +++ b/ckan/lib/celery_app.py @@ -63,10 +63,11 @@ try: for key, value in config.items('app:celery'): + key = key.upper() if key in LIST_PARAMS: - default_config[key.upper()] = value.split() + default_config.setdefault(key, []).extend(value.split()) else: - default_config[key.upper()] = value + default_config[key] = value except ConfigParser.NoSectionError: pass