]> git.evergreen-ils.org Git - contrib/Conifer.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:29:06 +0000 (12:29 -0500)
commit4b9ca1e9e0e68de271fa5e3e0b9663c32c230070
tree6f55744778af6b825d66350ce882e4245a01c90a
parent364c3fa7dddaff6c1252eb5f7aa09691a0289e70
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