From: erickson Date: Tue, 13 Jan 2009 18:02:05 +0000 (+0000) Subject: until it can be tested thoroughly, continue offloading the penalty calc to the penalt... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4e51bc2a6334f11f40ee0e17da253f4135540fc2;p=Evergreen.git until it can be tested thoroughly, continue offloading the penalty calc to the penalty server git-svn-id: svn://svn.open-ils.org/ILS/trunk@11816 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index 2e0119cd50..99ee1bf014 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -602,6 +602,7 @@ sub generate_fines { my %hoo = map { ( $_->id => $_ ) } actor::org_unit::hours_of_operation->retrieve_all; + my $penalty = OpenSRF::AppSession->create('open-ils.penalty'); for my $c (@circs) { try { @@ -765,7 +766,20 @@ sub generate_fines { $self->method_lookup('open-ils.storage.transaction.commit')->run; - OpenILS::Utils::Penalty->calculate_penalties(undef, $c->usr, $c->circ_lib); + if(0) { # caluclate penalties inline. Needs to be tested. + OpenILS::Utils::Penalty->calculate_penalties( + undef, $c->usr->to_fieldmapper->id.'', $c->circ_lib->to_fieldmapper->id.''); + + } else { + + $penalty->request( + 'open-ils.penalty.patron_penalty.calculate', + { patron => $c->usr->to_fieldmapper, + update => 1, + background => 1, + } + )->gather(1); + } } catch Error with { my $e = shift;