]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1662902: do not re-download EDI files that failed processing
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 9 Feb 2017 17:24:35 +0000 (12:24 -0500)
committerMike Rylander <mrylander@gmail.com>
Fri, 17 Feb 2017 17:28:21 +0000 (12:28 -0500)
commit7e335da96df74748265c8bc016ecc5dbe53740c5
tree09fb11d1957bda8e0c2e9458c6a13c6b835d7169
parentc1ab6f7799f758eec048bc79d158e088c302f05d
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 <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm