Commit b31c0e8d authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Check for batchstate!='locked' when considering experiments to act on.

A failed swapout/endexp will leave the experiment in its original
state (which is what we want), but also leave the batchstate locked,
so use that to make sure we do not try to continually swapout/endexp
an experiment that failed its swapout/endexp.

The other possibility to move the experiment out of the batch queue
on such a failure. Might do that later.

Note that we should probably put a check in db/audit for experiments
with the batchstate='locked'.
parent 685dc64c
......@@ -182,6 +182,7 @@ while (1) {
"WHERE e2.eid is null and ".
" e1.batchmode=1 and e1.canceled=0 and ".
" e1.expt_locked is null and ".
" e1.batchstate!='$BSTATE_LOCKED' and ".
" e1.state='$BSTATE_POSTED' and ".
" (e1.attempts=0 or ".
......@@ -190,7 +191,8 @@ while (1) {
$running_result =
DBQuery("select * from experiments ".
"where batchmode=1 and state='$BSTATE_RUNNING' ".
"where batchmode=1 and state='$BSTATE_RUNNING' and ".
" batchstate!='$BSTATE_LOCKED' ".
"ORDER BY expt_start");
if (!$pending_result || !$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