diff --git a/enterprise_catalog/settings/base.py b/enterprise_catalog/settings/base.py index bd4fef145..55aef03fe 100644 --- a/enterprise_catalog/settings/base.py +++ b/enterprise_catalog/settings/base.py @@ -346,6 +346,10 @@ # see https://github.com/celery/django-celery-results/issues/326 # on CELERY_RESULT_EXTENDED CELERY_RESULT_EXTENDED = True +# these settings allow recovery when autoscaling ends up killing a task +# see https://stackoverflow.com/a/45059806 +CELERY_ACKS_LATE = True +CELERY_TASK_REJECT_ON_WORKER_LOST = True # Celery task time limits. # Tasks will be asked to quit after 15 minutes...