From 9f7aab177c0d19ada73216331a7a09d016267e2a Mon Sep 17 00:00:00 2001 From: Rebecca Cremona Date: Tue, 31 Oct 2023 13:25:49 -0400 Subject: [PATCH] Handle logging differently when Scoop fails in this particular way. --- perma_web/perma/celery_tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/perma_web/perma/celery_tasks.py b/perma_web/perma/celery_tasks.py index db620c6b2..df858c0fd 100644 --- a/perma_web/perma/celery_tasks.py +++ b/perma_web/perma/celery_tasks.py @@ -1081,6 +1081,9 @@ def capture_with_scoop(capture_job): if poll_data['stderr_logs'] and didnt_load in poll_data['stderr_logs']: logger.warning(f"{capture_job.link_id}: Scoop failed to load submitted URL ({capture_job.submitted_url}).") capture_job.link.tags.add('scoop-load-failure') + elif not poll_data['stderr_logs'] and poll_data['stdout_logs'] and poll_data['stdout_logs'].endswith(' created.\n'): + logger.warning(f"{capture_job.link_id}: Scoop stopped after tmp folder creation.") + capture_job.link.tags.add('scoop-stopped-failure') elif not poll_data['stderr_logs'] and not poll_data['stdout_logs']: logger.warning(f"{capture_job.link_id}: Scoop failed without logs ({poll_data['id_capture']}).") capture_job.link.tags.add('scoop-silent-failure')