Skip to content

Commit

Permalink
Re-enable background task
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Jan 24, 2024
1 parent f768bea commit 1654000
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readux_ingest_ecds/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 1654000

Please sign in to comment.