getQueuedBuilds(): Don't catch errors while loading a build from the queue

Otherwise we never recover from reset daemon connections, e.g.

  hydra-queue-runner[16106]: while loading build 599369: cannot start daemon worker: reading from file: Connection reset by peer
  hydra-queue-runner[16106]: while loading build 599236: writing to file: Broken pipe
  ...

The error is now handled queueMonitor(), causing the next call to
queueMonitorLoop() to create a new connection.
This commit is contained in:
Eelco Dolstra 2015-06-26 21:06:35 +02:00
parent f5e5a1b96e
commit 008d610467

View file

@ -719,8 +719,8 @@ void State::getQueuedBuilds(Connection & conn, std::shared_ptr<StoreAPI> store,
try { try {
createBuild(build); createBuild(build);
} catch (Error & e) { } catch (Error & e) {
printMsg(lvlError, format("while loading build %1%: %2%") % build->id % e.what()); e.addPrefix(format("while loading build %1%: ") % build->id);
continue; // FIXME: retry later? throw;
} }
/* Add the new runnable build steps to runnable and wake up /* Add the new runnable build steps to runnable and wake up