Skip to content

Commit

Permalink
Allow overriding celery list params
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
philpep committed Nov 7, 2017
1 parent bb6991b commit ee248d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckan/lib/celery_app.py
Expand Up @@ -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

Expand Down

0 comments on commit ee248d2

Please sign in to comment.