[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 144fb20f896bf7bb4576177baf6554aa035e9afa

Evergreen Git git at git.evergreen-ils.org
Fri Jun 21 09:40:50 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_3 has been updated
       via  144fb20f896bf7bb4576177baf6554aa035e9afa (commit)
      from  0c37a958ff32fd394b8a60b33b4d218acf2f83ef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 144fb20f896bf7bb4576177baf6554aa035e9afa
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jun 20 23:39:21 2013 -0400

    return, not next, from eval BLOCK
    
    Per perldoc eval, exiting an eval BLOCK is not allowed. And it generates
    warnings - 37,000 of them in one day - on a system on which the fine
    generator runs every 15 minutes. Simply returning from the block
    achieves the same goal without generating scads of warnings.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index c2ed9ef..ea7bc41 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -854,7 +854,7 @@ sub generate_fines {
             if ( $fine_interval == 0 || int($c->$recurring_fine_method * 100) == 0 || int($c->max_fine * 100) == 0 ) {
                 $client->respond( "Fine Generator skipping circ due to 0 fine interval, 0 fine rate, or 0 max fine.\n" );
                 $log->info( "Fine Generator skipping circ " . $c->id . " due to 0 fine interval, 0 fine rate, or 0 max fine." );
-                next;
+                return;
             }
 
 			if ( $is_reservation and $fine_interval >= interval_to_seconds('1d') ) {	
@@ -900,7 +900,7 @@ sub generate_fines {
 				$grace_period = OpenILS::Application::Circ::CircCommon->extend_grace_period($c->$circ_lib_method->to_fieldmapper->id,$c->$due_date_method,$grace_period,undef,$hoo{$c->$circ_lib_method});
 			}
 
-            next if ($last_fine > $now);
+            return if ($last_fine > $now);
             # Generate fines for each past interval, including the one we are inside
             my $pending_fine_count = ceil( ($now - $last_fine) / $fine_interval );
 
@@ -910,11 +910,11 @@ sub generate_fines {
             ) {
                 $client->respond( "Still inside grace period of: ". seconds_to_interval( $grace_period )."\n" );
                 $log->info( "Circ ".$c->id." is still inside grace period of: $grace_period [". seconds_to_interval( $grace_period ).']' );
-                next;
+                return;
             }
 
             $client->respond( "\t$pending_fine_count pending fine(s)\n" );
-            next unless ($pending_fine_count);
+            return unless ($pending_fine_count);
 
 			my $recurring_fine = int($c->$recurring_fine_method * 100);
 			my $max_fine = int($c->max_fine * 100);
@@ -950,7 +950,7 @@ sub generate_fines {
 					my $dow_close = "dow_${dow}_close";
 
 					if (my $h = $hoo{$c->$circ_lib_method}) {
-						next if ( $h->$dow_open eq '00:00:00' and $h->$dow_close eq '00:00:00');
+						return if ( $h->$dow_open eq '00:00:00' and $h->$dow_close eq '00:00:00');
 					}
 	
 					my @cl = actor::org_unit::closed_date->search_where(
@@ -958,7 +958,7 @@ sub generate_fines {
 							  close_end	=> { '>=' => $timestamptz },
 							  org_unit	=> $c->$circ_lib_method }
 					);
-					next if (@cl);
+					return if (@cl);
 				}
 
 				$current_fine_total += $recurring_fine;

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list