celery: celery 4.X support. Fixes #4169

- update tasks
- enabled celerybeat to function
- check and cleanup code for 4.X
This commit is contained in:
Marcin Kuzminski 2017-11-16 19:26:53 +01:00
parent 1d332c03ad
commit 6bbab12fcc
26 changed files with 516 additions and 739 deletions

View file

@ -271,28 +271,15 @@ labs_settings_active = true
### CELERY CONFIG ####
####################################
use_celery = false
broker.host = localhost
broker.vhost = rabbitmqhost
broker.port = 5672
broker.user = rabbitmq
broker.password = qweqwe
celery.imports = rhodecode.lib.celerylib.tasks
# connection url to the message broker (default rabbitmq)
celery.broker_url = amqp://rabbitmq:qweqwe@localhost:5672/rabbitmqhost
celery.result.backend = amqp
celery.result.dburi = amqp://
celery.result.serialier = json
#celery.send.task.error.emails = true
#celery.amqp.task.result.expires = 18000
celeryd.concurrency = 2
#celeryd.log.file = celeryd.log
celeryd.log.level = debug
celeryd.max.tasks.per.child = 1
# maximum tasks to execute before worker restart
celery.max_tasks_per_child = 100
## tasks will never be sent to the queue, but executed locally instead.
celery.always.eager = false
celery.task_always_eager = false
####################################
### BEAKER CACHE ####
@ -619,7 +606,7 @@ custom.conf = 1
### LOGGING CONFIGURATION ####
################################
[loggers]
keys = root, sqlalchemy, beaker, rhodecode, ssh_wrapper
keys = root, sqlalchemy, beaker, rhodecode, ssh_wrapper, celery
[handlers]
keys = console, console_sql
@ -658,6 +645,11 @@ handlers =
qualname = ssh_wrapper
propagate = 1
[logger_celery]
level = DEBUG
handlers =
qualname = celery
##############
## HANDLERS ##