From e4893ee7d076dc6059ce9067117a40b63410ede2 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 13 Jul 2007 15:43:33 +0000 Subject: [PATCH] changed circ retrieval to lower level, streaming opensrf call for better handling of longer, larger queries git-svn-id: svn://svn.open-ils.org/ILS/trunk@7546 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Evergreen/src/support-scripts/eg_gen_overdue.pl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Evergreen/src/support-scripts/eg_gen_overdue.pl b/Evergreen/src/support-scripts/eg_gen_overdue.pl index d50349485d..77bac16c2b 100755 --- a/Evergreen/src/support-scripts/eg_gen_overdue.pl +++ b/Evergreen/src/support-scripts/eg_gen_overdue.pl @@ -24,6 +24,7 @@ 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'; @@ -96,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" ); } @@ -452,8 +459,8 @@ sub send_email { $tmpl =~ s/\${EMAIL_RECIPIENT}/$pemail/; - $tmpl =~ s/\${EMAIL_SENDER}/$mail_sender/o; - $tmpl =~ s/\${EMAIL_REPLY_TO}/$mail_sender/; + $tmpl =~ s/\${EMAIL_SENDER}/$errors_to/o; + $tmpl =~ s/\${EMAIL_REPLY_TO}/$errors_to/; $tmpl =~ s/\${EMAIL_ERRORS_TO}/$errors_to/; $tmpl =~ s/\${EMAIL_HEADERS}//; # - we have no additional headers to add -- 2.43.2