From: erickson Date: Mon, 29 Dec 2008 17:55:47 +0000 (+0000) Subject: if the hold targeter server process stops responding, clean up and go away X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b2765433a7add85af0bba424dba8aa1be01ee222;p=Evergreen.git if the hold targeter server process stops responding, clean up and go away git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_4@11691 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/support-scripts/hold_targeter.pl b/Open-ILS/src/support-scripts/hold_targeter.pl index bef9f5b722..73a19888f6 100755 --- a/Open-ILS/src/support-scripts/hold_targeter.pl +++ b/Open-ILS/src/support-scripts/hold_targeter.pl @@ -26,7 +26,11 @@ my $r = OpenSRF::AppSession ->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;