From 719df63190e885e0503bbc7029d403fdd666b5ef Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 25 Jul 2017 19:46:24 -0500 Subject: [PATCH] queue-monitor: never move lastBuildId forward without processing jobs. --- src/hydra-queue-runner/queue-monitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index f94007d2..21981aa9 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -49,7 +49,7 @@ void State::queueMonitorLoop() conn->get_notifs(); if (auto lowestId = buildsAdded.get()) { - lastBuildId = std::stoi(*lowestId) - 1; + lastBuildId = std::min(lastBuildId, static_cast(std::stoul(*lowestId) - 1)); printMsg(lvlTalkative, "got notification: new builds added to the queue"); } if (buildsRestarted.get()) {