Commit ba8103b0 authored by Leigh Stoller's avatar Leigh Stoller

Add batch/retry_wait sitevar, defaulted to 900 seconds between

retries. Change batch daemon to check that variable each loop.
parent 3888e818
......@@ -15,4 +15,4 @@ INSERT INTO sitevariables VALUES ('web/message',NULL,'','Message to place in lar
INSERT INTO sitevariables VALUES ('idle/threshold',NULL,'4','Number of hours of inactivity for a node/expt to be considered idle.');
INSERT INTO sitevariables VALUES ('idle/mailinterval',NULL,'4','Number of hours since sending a swap request before sending another one. (Timing of first one is determined by idle/threshold.)');
INSERT INTO sitevariables VALUES ('idle/cc_grp_ldrs',NULL,'3','Start CC\'ing group and project leaders on idle messages on the Nth message.');
INSERT INTO sitevariables VALUES ('batch/retry_wait',NULL,'900','Number of seconds to wait before retrying a failed batch experiment.');
......@@ -120,6 +120,11 @@ if (! $debug) {
while (1) {
my($count, $i, $query_result, $pending_result, $running_result);
my(%row, %pending_row);
my $retry_wait = TBGetSiteVar("batch/retry_wait");
# Do not allow zero!
$retry_wait = 60
if ($retry_wait == 0);
#
# Need to lock the table here because of cancelation in endexp.
......@@ -158,7 +163,7 @@ while (1) {
" e1.batchstate='$BSTATE_POSTED' and ".
" (e1.attempts=0 or ".
" ((UNIX_TIMESTAMP() - ".
" UNIX_TIMESTAMP(e1.expt_start) > (60 * 15)))) ".
" UNIX_TIMESTAMP(e1.expt_start) > ($retry_wait)))) ".
"ORDER BY e1.expt_start LIMIT 1");
$running_result =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment