Keep machine stats even when a machine is removed from the machines file

This is important for the Hydra provisioner, since it needs to be able
to see whether a disabled machine still has jobs running on it.
This commit is contained in:
Eelco Dolstra
2015-09-02 13:31:47 +02:00
parent 2d116d758a
commit 7e954aff03
3 changed files with 11 additions and 1 deletions

View File

@ -89,6 +89,7 @@ system_time State::doDispatch()
auto machines_(machines.lock());
for (auto & m : *machines_) {
auto info(m.second->state->connectInfo.lock());
if (!m.second->enabled) continue;
if (info->consecutiveFailures && info->disabledUntil > now) {
if (info->disabledUntil < sleepUntil)
sleepUntil = info->disabledUntil;