From d6bab7ae43feb872af795022106f6848f41f09ad Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 27 Jul 2012 11:11:25 -0400 Subject: [PATCH] Added debug-only option to edi_pusher.pl Option causes the final EDI to be printed to STDOUT, but does not populate any data in the DB nor does it FTP the file to the vendor. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/src/support-scripts/edi_pusher.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/support-scripts/edi_pusher.pl b/Open-ILS/src/support-scripts/edi_pusher.pl index 80e4e19ad1..e94abb85a1 100755 --- a/Open-ILS/src/support-scripts/edi_pusher.pl +++ b/Open-ILS/src/support-scripts/edi_pusher.pl @@ -33,7 +33,10 @@ INIT { my %defaults = ( 'quiet' => 0, 'test' => 0, # TODO - 'max-batch-size=i' => -1 + 'max-batch-size=i' => -1, + + # if true, print final EDI to STDOUT, send nothign to the vendor, write nothing to the DB + 'debug-only' => 0 ); my $cs = OpenILS::Utils::Cronscript->new(\%defaults); @@ -173,6 +176,12 @@ foreach my $def (@$defs) { # than to add a cascade of failing inscrutable copies of the same message(s) to our DB. } + if ($opts->{'debug-only'}) { + print OpenILS::Application::Acq::EDI->attempt_translation($message, 1)->edi . "\n"; + print "\ndebug-only => skipping FTP\n"; + next; + } + print "Writing new message + translation to DB for $logstr2\n"; $e->xact_begin; -- 2.43.2