Skip to content

Commit

Permalink
Save Manifest on success
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Apr 25, 2024
1 parent 9390a69 commit ca34117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readux_ingest_ecds/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def on_success(self, retval, task_id, args, kwargs):
ingest = Local.objects.get(id=args[0])
LOGGER.info(f'SUCCESS!!! {ingest.manifest.pid}')
send_email_on_success(creator=ingest.creator, manifest=ingest.manifest)
ingest.manifest.save()
ingest.delete()

def on_failure(self, exc, task_id, args, kwargs, einfo):
Expand All @@ -59,7 +60,6 @@ def on_failure(self, exc, task_id, args, kwargs, einfo):
ingest = Local.objects.get(id=args[0])
LOGGER.info(f'FAIL!!! {ingest.manifest.pid}')
send_email_on_failure(bundle=ingest.bundle.name, creator=ingest.creator, exception=str(exc))
ingest.manifest.save()
ingest.delete()

app = Celery('readux_ingest_ecds', result_extended=True)
Expand Down

0 comments on commit ca34117

Please sign in to comment.