# HG changeset patch # User Mads Kiilerich # Date 1582563077 -3600 # Node ID b2f7d1c4e0017b68255ca63078c273dddc1460ec # Parent ecd3cf91b2939358387b79d2396a65f56d9c92d6 celery: log an error for some deprecated config settings dburi was dropped from templates in d34a59bfcebb1 and is no longer supported in Celery 4. celery.send.task.error.emails will no longer be supported in Celery 4 and was just removed from the .ini template . The "serialier" typo was fixed in 8169770a4f2c. It might bite people if they keep using the wrong spelling. diff -r ecd3cf91b293 -r b2f7d1c4e001 kallithea/lib/celerypylons/__init__.py --- a/kallithea/lib/celerypylons/__init__.py Thu Feb 20 01:35:22 2020 +0100 +++ b/kallithea/lib/celerypylons/__init__.py Mon Feb 24 17:51:17 2020 +0100 @@ -14,6 +14,8 @@ mandatory settings. """ +import logging + import celery import tg @@ -25,6 +27,16 @@ CELERY_TASK_SERIALIZER = 'json' +desupported = set([ + 'celery.result.dburi', + 'celery.result.serialier', + 'celery.send.task.error.emails', +]) + + +log = logging.getLogger(__name__) + + def celery_config(config): """Return Celery config object populated from relevant settings in a config dict, such as tg.config""" @@ -34,6 +46,8 @@ LIST_PARAMS = """CELERY_IMPORTS CELERY_ACCEPT_CONTENT""".split() for config_key, config_value in sorted(config.items()): + if config_key in desupported and config_value: + log.error('Celery configuration setting %r is no longer supported', config_key) celery_key = config_key.replace('.', '_').upper() if celery_key.split('_', 1)[0] not in PREFIXES: continue