celery: don't disable celery if 1 task fails. This results in permanent

disable in case of any errors. We rather want to always check and fallback
to sync.
This commit is contained in:
Marcin Kuzminski 2017-11-30 15:14:21 +01:00
parent cd62984203
commit b1de755718

View file

@ -63,10 +63,6 @@ def run_task(task, *args, **kwargs):
"Exception while trying to run task asynchronous. "
"Fallback to sync execution.")
# keep in mind there maybe a subtle race condition where something
# depending on rhodecode.CELERY_ENABLED
# will see CELERY_ENABLED as True before this has a chance to set False
rhodecode.CELERY_ENABLED = celery_is_up
else:
log.debug('executing task %s:%s in sync mode', 'TASK', task)