[open-ils-commits] r15813 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 11 18:38:38 EST 2010
Author: erickson
Date: 2010-03-11 18:38:32 -0500 (Thu, 11 Mar 2010)
New Revision: 15813
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
added auto_overlay_exact option to queue import call, which uses new overlay/merge functions
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2010-03-11 23:38:31 UTC (rev 15812)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2010-03-11 23:38:32 UTC (rev 15813)
@@ -493,6 +493,10 @@
$query->{id} = {'not in' => $matched_recs} if @$matched_recs;
}
+ if($$options{auto_overlay_exact}) {
+ auto_overlay_exact($type, $q_id, $$options{merge_profile});
+ }
+
my $search = ($type eq 'bib') ?
'search_vandelay_queued_bib_record' : 'search_vandelay_queued_authority_record';
my $rec_ids = $e->$search($query, {idlist => 1});
@@ -501,7 +505,39 @@
return {complete => 1};
}
+sub auto_overlay_exact {
+ my $type = shift;
+ my $q_id = shift;
+ my $merge_profile = shift;
+ my $e = new_editor(xact => 1);
+
+ my $err;
+ try {
+
+ $e->json_query(
+ {
+ from => [
+ "vandelay.auto_overlay_${type}_queue", $q_id, $merge_profile
+ ]
+ },
+ {
+ substream => 1,
+ discard => 1
+ }
+ );
+
+ } catch Error with {
+ $err = shift;
+ $logger->error("vl: fatal error in auto-overlay: $err");
+ $e->rollback;
+ };
+
+ $e->commit unless $err;
+ return undef;
+}
+
+
# returns a list of queued record IDs for a given queue that
# have at least one entry in the match table
sub queued_records_with_matches {
More information about the open-ils-commits
mailing list