[open-ils-commits] r11009 - branches/rel_1_4/Open-ILS/src/support-scripts
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 31 10:09:09 EDT 2008
Author: erickson
Date: 2008-10-31 10:09:06 -0400 (Fri, 31 Oct 2008)
New Revision: 11009
Modified:
branches/rel_1_4/Open-ILS/src/support-scripts/generate_circ_notices.pl
Log:
retrieve bibs using substream (streaming) mode. handle retrieval failure more gracefully. log retrieval failure
Modified: branches/rel_1_4/Open-ILS/src/support-scripts/generate_circ_notices.pl
===================================================================
--- branches/rel_1_4/Open-ILS/src/support-scripts/generate_circ_notices.pl 2008-10-31 11:43:57 UTC (rev 11008)
+++ branches/rel_1_4/Open-ILS/src/support-scripts/generate_circ_notices.pl 2008-10-31 14:09:06 UTC (rev 11009)
@@ -266,6 +266,7 @@
my @circs = @_;
return unless @circs;
my $circ_list = fetch_circ_data(@circs);
+ return unless @$circ_list;
my $tt = Template->new({ABSOLUTE => 1});
# see if there is a configured bounce address for this org unit.
@@ -410,8 +411,10 @@
]);
$ORG_CACHE{$circ_lib_id} = $circ_lib;
+ my $circ_ids = [map {$_->id} @circs];
+
my $circ_objs = $e->search_action_circulation([
- {id => [map {$_->id} @circs]},
+ {id => $circ_ids},
{ flesh => 3,
flesh_fields => {
circ => [q/target_copy/],
@@ -419,8 +422,10 @@
acn => ['record'],
}
}
- ]);
+ ], {substream => 1});
+ $logger->error("notice: error retrieving circ objects @$circ_ids") unless @$circ_ids;
+
$_->circ_lib($circ_lib) for @$circ_objs;
$_->usr($usr) for @$circ_objs;
More information about the open-ils-commits
mailing list