[open-ils-commits] r7547 - branches/rel_1_0_6/Evergreen/src/support-scripts

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jul 13 12:00:38 EDT 2007


Author: erickson
Date: 2007-07-13 11:55:39 -0400 (Fri, 13 Jul 2007)
New Revision: 7547

Modified:
   branches/rel_1_0_6/Evergreen/src/support-scripts/eg_gen_overdue.pl
Log:
back-porting circ fetching robustification just in case...

Modified: branches/rel_1_0_6/Evergreen/src/support-scripts/eg_gen_overdue.pl
===================================================================
--- branches/rel_1_0_6/Evergreen/src/support-scripts/eg_gen_overdue.pl	2007-07-13 15:43:33 UTC (rev 7546)
+++ branches/rel_1_0_6/Evergreen/src/support-scripts/eg_gen_overdue.pl	2007-07-13 15:55:39 UTC (rev 7547)
@@ -21,8 +21,10 @@
 use Email::Send;
 use DateTime::Format::ISO8601;
 use OpenSRF::Utils qw/:datetime/;
+use OpenSRF::Utils::JSON;
 use Unicode::Normalize;
 use OpenILS::Const qw/:const/;
+use OpenSRF::AppSession;
 
 my $U = 'OpenILS::Application::AppUtils';
 
@@ -95,8 +97,14 @@
 			},
 			{ order_by => { circ => 'usr, circ_lib' } }
 		];
-		my $circs = $e->search_action_circulation($query, {idlist=>1});
+		#my $circs = $e->search_action_circulation($query, {idlist=>1});
 
+        my $ses = OpenSRF::AppSession->create('open-ils.cstore');
+        my $req = $ses->request('open-ils.cstore.direct.action.circulation.id_list', @$query);
+        my $circs = [];
+        my $resp;
+        push(@$circs, $resp->content) while ($resp = $req->recv(timeout=>600));
+
 		process_circs( $circs, "${day}day" );
 	}
 }
@@ -445,7 +453,7 @@
 	if( my $set = $e->search_actor_org_unit_setting( 
 			{ name => 'org.bounced_emails', org_unit => $org->id } )->[0] ) {
 
-		my $bemail = JSON->JSON2perl($set->value);
+		my $bemail = OpenSRF::Utils::JSON->JSON2perl($set->value);
 		$errors_to = $bemail if $bemail;
 	}
 



More information about the open-ils-commits mailing list