From 2ab8e9a1e0eb8374db923115fa7f850c0a2cd908 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Mon, 7 Mar 2016 19:05:24 +0100
Subject: [PATCH] hydra-queue-runner: Fix handling of missing derivations

This barfed with 'queue monitor: ERROR: column "errormsg" of relation
"builds" does not exist' due to the removal of the errorMsg column.
---
 src/hydra-queue-runner/queue-monitor.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc
index c9ea6da2..c309ddc0 100644
--- a/src/hydra-queue-runner/queue-monitor.cc
+++ b/src/hydra-queue-runner/queue-monitor.cc
@@ -127,11 +127,10 @@ bool State::getQueuedBuilds(Connection & conn, ref<Store> localStore,
                 auto mc = startDbUpdate();
                 pqxx::work txn(conn);
                 txn.parameterized
-                    ("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $3, errorMsg = $4 where id = $1 and finished = 0")
+                    ("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $3 where id = $1 and finished = 0")
                     (build->id)
                     ((int) bsAborted)
-                    (time(0))
-                    ("derivation was garbage-collected prior to build").exec();
+                    (time(0)).exec();
                 txn.commit();
                 build->finishedInDB = true;
                 nrBuildsDone++;