[open-ils-commits] r11816 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jan 13 13:02:08 EST 2009
Author: erickson
Date: 2009-01-13 13:02:05 -0500 (Tue, 13 Jan 2009)
New Revision: 11816
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Log:
until it can be tested thoroughly, continue offloading the penalty calc to the penalty server
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm 2009-01-13 17:47:18 UTC (rev 11815)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm 2009-01-13 18:02:05 UTC (rev 11816)
@@ -602,6 +602,7 @@
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,8 +766,21 @@
$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;
$client->respond( "Error processing overdue circulation [".$c->id."]:\n\n$e\n" );
More information about the open-ils-commits
mailing list