[open-ils-commits] r18173 - branches/rel_2_0/Open-ILS/src/support-scripts (atz)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Oct 5 12:18:59 EDT 2010
Author: atz
Date: 2010-10-05 12:18:56 -0400 (Tue, 05 Oct 2010)
New Revision: 18173
Modified:
branches/rel_2_0/Open-ILS/src/support-scripts/edi_fetcher.pl
branches/rel_2_0/Open-ILS/src/support-scripts/edi_pusher.pl
Log:
EDI job POD
Modified: branches/rel_2_0/Open-ILS/src/support-scripts/edi_fetcher.pl
===================================================================
--- branches/rel_2_0/Open-ILS/src/support-scripts/edi_fetcher.pl 2010-10-05 16:16:59 UTC (rev 18172)
+++ branches/rel_2_0/Open-ILS/src/support-scripts/edi_fetcher.pl 2010-10-05 16:18:56 UTC (rev 18173)
@@ -140,8 +140,6 @@
__END__
-=pod
-
=head1 NAME
edi_fetcher.pl - A script for retrieving and processing EDI files from remote accounts.
@@ -159,8 +157,8 @@
=head1 OPTIONS
- --account=[id] Target one account, whether or not it is inactive.
- --inactive Includes inactive provider accounts (default OFF, forced ON if --account specified)
+ --account=[id] Target one account, whether or not it is inactive.
+ --inactive Includes inactive provider accounts (default OFF, forced ON if --account specified)
=head1 ARGUMENTS
Modified: branches/rel_2_0/Open-ILS/src/support-scripts/edi_pusher.pl
===================================================================
--- branches/rel_2_0/Open-ILS/src/support-scripts/edi_pusher.pl 2010-10-05 16:16:59 UTC (rev 18172)
+++ branches/rel_2_0/Open-ILS/src/support-scripts/edi_pusher.pl 2010-10-05 16:18:56 UTC (rev 18173)
@@ -32,6 +32,7 @@
my %defaults = (
'quiet' => 0,
+ 'test' => 0, # TODO
'max-batch-size=i' => -1
);
@@ -48,6 +49,8 @@
$opts->{verbose} = 0 if $opts->{quiet};
+print "FTP_PASSIVE is ", ($ENV{FTP_PASSIVE} ? "ON" : "OFF"), "\n";
+
print "\nHook '$hook' is used in ", scalar(@$defs), " event definition(s):\n";
$Data::Dumper::Indent = 1;
@@ -154,6 +157,10 @@
print "\ntarget->provider->edi_default->id: ", $target->provider->edi_default->id, "\n";
my $logstr2 = sprintf "event %s, PO %s, template_output %s", $_->{id}, $message->purchase_order, $event->template_output->id;
+ if ($opts->{test}) {
+ print "Test mode, skipping translation/send\n";
+ }
+
printf "\nNow calling attempt_translation for $logstr2\n\n";
unless (OpenILS::Application::Acq::EDI->attempt_translation($message, 1)) {
@@ -191,3 +198,41 @@
}
print "\ndone\n";
+
+__END__
+
+=head1 NAME
+
+edi_pusher.pl - A script for generating and sending EDI files to remote accounts.
+
+=head1 DESCRIPTION
+
+This script is expected to be run via crontab, for the purpose of retrieving vendor EDI files.
+
+=head1 OPTIONS
+
+ --max-batch-size=i Limit the processing to a set number of events.
+
+=head1 TODO
+
+More docs here.
+
+=head1 USAGE
+
+B<FTP_PASSIVE=1> is recommended. Depending on your vendors' and your own network environments, you may want to set/export
+the environmental variable FTP_PASSIVE like:
+
+ export FTP_PASSIVE=1
+ # or
+ FTP_PASSIVE=1 Open-ILS/src/support-scripts/edi_pusher.pl
+
+=head1 SEE ALSO
+
+ OpenILS::Utils::Cronscript
+ edi_fetcher.pl
+
+=head1 AUTHOR
+
+Joe Atzberger <jatzberger at esilibrary.com>
+
+=cut
More information about the open-ils-commits
mailing list