Changeset - ecd3cf91b293
[Not reviewed]
default
0 3 0
Mads Kiilerich - 6 years ago 2020-02-20 01:35:22
mads@kiilerich.com
celery: drop config settings not supported in Celery 4

CELERY_SEND_TASK_ERROR_EMAILS has been removed, according to
https://docs.celeryproject.org/en/3.0/whatsnew-4.0.html#features-removed-for-simplicity :
"Tasks no longer sends error emails. This also removes support for
app.mail_admins, and any functionality related to sending emails."

The "ADMINS" prefix might be a left-over from the long removed
celery.conf.ADMINS - last seen on
https://docs.celeryproject.org/en/2.1-archived/reference/celery.conf.html#celery.conf.ADMINS .

The "ROUTES" prefix might refer to "CELERY_ROUTES" ... but it doesn't take a
simple string list anyway, so there is no point in treating it as a list value.
3 files changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -254,13 +254,12 @@ use_celery = false
 

	
 
## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':
 
broker.url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
 

	
 
celery.result.backend = db+sqlite:///celery-results.db
 

	
 
#celery.send.task.error.emails = true
 
#celery.amqp.task.result.expires = 18000
 

	
 
celeryd.concurrency = 2
 
celeryd.max.tasks.per.child = 1
 

	
 
## If true, tasks will never be sent to the queue, but executed locally instead.
kallithea/lib/celerypylons/__init__.py
Show inline comments
 
@@ -28,13 +28,13 @@ class CeleryConfig(object):
 
def celery_config(config):
 
    """Return Celery config object populated from relevant settings in a config dict, such as tg.config"""
 

	
 
    celery_config = CeleryConfig()
 

	
 
    PREFIXES = """ADMINS BROKER CASSANDRA CELERYBEAT CELERYD CELERYMON CELERY EMAIL SERVER""".split()
 
    LIST_PARAMS = """CELERY_IMPORTS ADMINS ROUTES CELERY_ACCEPT_CONTENT""".split()
 
    LIST_PARAMS = """CELERY_IMPORTS CELERY_ACCEPT_CONTENT""".split()
 

	
 
    for config_key, config_value in sorted(config.items()):
 
        celery_key = config_key.replace('.', '_').upper()
 
        if celery_key.split('_', 1)[0] not in PREFIXES:
 
            continue
 
        if not isinstance(config_value, str):
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
@@ -360,13 +360,12 @@ use_celery = false
 

	
 
<%text>## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':</%text>
 
broker.url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
 

	
 
celery.result.backend = db+sqlite:///celery-results.db
 

	
 
#celery.send.task.error.emails = true
 
#celery.amqp.task.result.expires = 18000
 

	
 
celeryd.concurrency = 2
 
celeryd.max.tasks.per.child = 1
 

	
 
<%text>## If true, tasks will never be sent to the queue, but executed locally instead.</%text>
0 comments (0 inline, 0 general)