[open-ils-commits] r15809 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 11 16:43:31 EST 2010
Author: erickson
Date: 2010-03-11 16:43:25 -0500 (Thu, 11 Mar 2010)
New Revision: 15809
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
allow marc file attributes to be passed directly to vandelay spooler, bypass the cache
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2010-03-11 21:32:13 UTC (rev 15808)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2010-03-11 21:43:25 UTC (rev 15809)
@@ -199,8 +199,11 @@
my $self = shift;
my $client = shift;
my $auth = shift;
- my $fingerprint = shift;
+ my $fingerprint = shift || '';
my $queue_id = shift;
+ my $purpose = shift;
+ my $filename = shift;
+ my $bib_source = shift;
my $e = new_editor(authtoken => $auth, xact => 1);
return $e->die_event unless $e->checkauth;
@@ -222,10 +225,12 @@
my $cache = new OpenSRF::Utils::Cache();
- my $data = $cache->get_cache('vandelay_import_spool_' . $fingerprint);
- my $purpose = $data->{purpose};
- my $filename = $data->{path};
- my $bib_source = $data->{bib_source};
+ if($fingerprint) {
+ my $data = $cache->get_cache('vandelay_import_spool_' . $fingerprint);
+ $purpose = $data->{purpose};
+ $filename = $data->{path};
+ $bib_source = $data->{bib_source};
+ }
unless(-r $filename) {
$logger->error("unable to read MARC file $filename");
@@ -247,7 +252,7 @@
my $r = -1;
while (try { $r = $batch->next } otherwise { $r = -1 }) {
if ($r == -1) {
- $logger->warn("Proccessing of record $count in set $fingerprint failed. Skipping this record");
+ $logger->warn("Proccessing of record $count in set $filename failed. Skipping this record");
$count++;
}
@@ -275,7 +280,7 @@
$e->commit;
unlink($filename);
- $cache->delete_cache('vandelay_import_spool_' . $fingerprint);
+ $cache->delete_cache('vandelay_import_spool_' . $fingerprint) if $fingerprint;
return undef;
}
More information about the open-ils-commits
mailing list