From: erickson Date: Fri, 13 Jul 2007 15:55:39 +0000 (+0000) Subject: back-porting circ fetching robustification just in case... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Frel_1_0_6;p=Evergreen.git back-porting circ fetching robustification just in case... git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0_6@7547 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Evergreen/src/support-scripts/eg_gen_overdue.pl b/Evergreen/src/support-scripts/eg_gen_overdue.pl index 6b02865f19..77bac16c2b 100755 --- a/Evergreen/src/support-scripts/eg_gen_overdue.pl +++ b/Evergreen/src/support-scripts/eg_gen_overdue.pl @@ -21,8 +21,10 @@ use DateTime; 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,7 +97,13 @@ sub print_notices { }, { 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 @@ sub send_email { 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; }