Record failures to env provisioning jobs

This commit is contained in:
richard-dds 2019-09-19 14:38:53 -04:00
parent 6c7667b7fc
commit 48decf0f8b

View File

@ -108,19 +108,19 @@ def do_work(fn, task, csp, **kwargs):
raise task.retry(exc=e) raise task.retry(exc=e)
@celery.task(bind=True) @celery.task(bind=True, base=RecordEnvironmentFailure)
def create_environment(self, environment_id=None): def create_environment(self, environment_id=None):
do_work(do_create_environment, self, app.csp.cloud, environment_id=environment_id) do_work(do_create_environment, self, app.csp.cloud, environment_id=environment_id)
@celery.task(bind=True) @celery.task(bind=True, base=RecordEnvironmentFailure)
def create_atat_admin_user(self, environment_id=None): def create_atat_admin_user(self, environment_id=None):
do_work( do_work(
do_create_atat_admin_user, self, app.csp.cloud, environment_id=environment_id do_create_atat_admin_user, self, app.csp.cloud, environment_id=environment_id
) )
@celery.task(bind=True) @celery.task(bind=True, base=RecordEnvironmentFailure)
def create_environment_baseline(self, environment_id=None): def create_environment_baseline(self, environment_id=None):
do_work( do_work(
do_create_environment_baseline, do_create_environment_baseline,