From 1654000510f4ec5dcbb2277f8e98f3ec5e665815 Mon Sep 17 00:00:00 2001 From: Jay Varner Date: Wed, 24 Jan 2024 11:34:48 -0500 Subject: [PATCH] Re-enable background task --- readux_ingest_ecds/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readux_ingest_ecds/admin.py b/readux_ingest_ecds/admin.py index d2b3e52..35d3af4 100644 --- a/readux_ingest_ecds/admin.py +++ b/readux_ingest_ecds/admin.py @@ -23,10 +23,10 @@ def save_model(self, request, obj, form, change): def response_add(self, request, obj, post_url_continue=None): obj.refresh_from_db() - # if os.environ["DJANGO_ENV"] != 'test': # pragma: no cover - # local_ingest_task_ecds.apply_async(args=[obj.id]) - # else: - local_ingest_task_ecds(obj.id) + if os.environ["DJANGO_ENV"] != 'test': # pragma: no cover + local_ingest_task_ecds.apply_async(args=[obj.id]) + else: + local_ingest_task_ecds(obj.id) LOGGER.info(f'INGEST: Local ingest - {obj.id} - added for {obj.manifest.pid}') return redirect('/admin/manifests/manifest/{m}/change/'.format(m=obj.manifest.pk))