re-creating script-runner object on renew
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Aug 2006 13:26:08 +0000 (13:26 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Aug 2006 13:26:08 +0000 (13:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5639 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index 7888854..af9291c 100644 (file)
@@ -550,6 +550,7 @@ sub run_patron_permit_scripts {
 
        $penalties = $penalties->{fatal_penalties};
 
+
        # ---------------------------------------------------------------------
        # Now run the patron permit script 
        # ---------------------------------------------------------------------
@@ -1324,6 +1325,7 @@ sub attempt_checkin_hold_capture {
                return undef;
        }
 
+
        $logger->info("circulator: found permitted hold ".
                $hold->id . " for copy, capturing...");
 
@@ -1619,7 +1621,6 @@ sub do_renew {
        # -----------------------------------------------------------------
 
        $self->renewal_remaining( $circ->renewal_remaining - 1 );
-       #$self->renewal_remaining(0) if $self->renewal_remaining < 0;
        $self->circ($circ);
 
        $self->run_renew_permit;
@@ -1673,6 +1674,9 @@ sub run_renew_permit {
       $self->patron->id." returned events: @$events") if @$events;
 
        $self->push_events(OpenILS::Event->new($_)) for @$events;
+       
+       $logger->debug("circulator: re-creating script runner to be safe");
+       $self->mk_script_runner;
 }