[open-ils-commits] r11688 - trunk/Open-ILS/src/support-scripts

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Dec 29 12:55:05 EST 2008


Author: erickson
Date: 2008-12-29 12:55:02 -0500 (Mon, 29 Dec 2008)
New Revision: 11688

Modified:
   trunk/Open-ILS/src/support-scripts/hold_targeter.pl
Log:
if the hold targeter server process stops responding, clean up and go away

Modified: trunk/Open-ILS/src/support-scripts/hold_targeter.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/hold_targeter.pl	2008-12-29 17:54:03 UTC (rev 11687)
+++ trunk/Open-ILS/src/support-scripts/hold_targeter.pl	2008-12-29 17:55:02 UTC (rev 11688)
@@ -26,7 +26,11 @@
 		->create( 'open-ils.storage' )
 		->request( 'open-ils.storage.action.hold_request.copy_targeter' => '24h' );
 
-while (!$r->complete) { $r->recv };
+while (!$r->complete) { 
+    my $start = time;
+    $r->recv(timeout => 3600);
+    last if (time() - $start) >= 3600;
+};
 
 unlink $lockfile;
 



More information about the open-ils-commits mailing list