[open-ils-commits] r16956 - trunk/Open-ILS/src/support-scripts (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 16 09:57:17 EDT 2010
Author: erickson
Date: 2010-07-16 09:57:15 -0400 (Fri, 16 Jul 2010)
New Revision: 16956
Modified:
trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl
Log:
rearrange while loop to prevent error: Can't 'last' outside a loop block
Modified: trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl 2010-07-16 13:41:53 UTC (rev 16955)
+++ trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl 2010-07-16 13:57:15 UTC (rev 16956)
@@ -194,7 +194,10 @@
if (-e $opt_lockfile) {
die "I'm already running with lockfile $opt_lockfile\n" if (!$opt_process_hooks);
# sleeping loop if we're in --process-hooks mode
- do { last unless ( -e $opt_lockfile ); $max_sleep--; } while ($max_sleep >= 0 && sleep(1));
+ while ($max_sleep >= 0 && sleep(1)) {
+ last unless ( -e $opt_lockfile );
+ $max_sleep--;
+ }
}
# there's a tiny race condition here ... oh well
More information about the open-ils-commits
mailing list