From 35730098fb539ba6794eaed123de7a534b7f03e2 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 9 Feb 2017 12:24:35 -0500 Subject: [PATCH] LP#1662902: do not re-download EDI files that failed processing At present, the EDI fetcher ignores files (as determined by file name and EDI account details) that were already successfully processed. With this patch, ones that failed processing (e.g., acq.edi_message.state = 'proc_error') previously are ignored as well. This is because most processing errors reflect conditions that require some sort of manual intervention on the part of the materials vendor or the Evergreen user; having edi_fetcher.pl simply redownload and attempt to process the file has no effect other than causing the acq.edi_message table to grow. With this patch, the appearance of rows in acq.edi_message whose state is 'proc_error' should be taken as a signal to the Evergreen admin to investigate and resolve whatever issue caused the message to not be processed; after doing that, removing the acq.edi_message rows will allow the file to be downloaded again (assuming it's still available on the file server). To test ------- [1] Arrange to create or simulate an EDI message that failed processing. [2] Run edi_fetcher.pl to have it attempt to download the failed message in step #1; verify that the file is /not/ downloaded again and that no additonal acq.edi_message rows are created for it. Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm index ee978e23c4..60f7dc2325 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm @@ -136,7 +136,7 @@ sub retrieve_core { in_dir => $account->in_dir }, remote_file => {ilike => $remote_file}, - status => {'in' => [qw/ processed /]}, + status => {'in' => [qw/ processed proc_error /]}, }, { join => {"acqedi" => {}}, limit => 1 } ], { idlist => 1 } -- 2.43.2