changed circ retrieval to lower level, streaming opensrf call for better handling...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Jul 2007 15:43:33 +0000 (15:43 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Jul 2007 15:43:33 +0000 (15:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7546 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/src/support-scripts/eg_gen_overdue.pl

index d503494..77bac16 100755 (executable)
@@ -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