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'.
Showing with 3 additions and 1 deletion