From 639c660abfd5de62ecfcd8d3cbc2eb6924c7ec75 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 15 Feb 2020 14:54:21 +0100 Subject: [PATCH] Fix build --- src/hydra-queue-runner/queue-monitor.cc | 7 +++---- src/hydra-queue-runner/state.hh | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index 62de134a..3c02e1aa 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -102,9 +102,9 @@ bool State::getQueuedBuilds(Connection & conn, if (id > newLastBuildId) newLastBuildId = id; if (builds_->count(id)) continue; - auto build = std::make_shared(); + auto build = std::make_shared( + localStore->parseStorePath(row["drvPath"].as())); build->id = id; - build->drvPath = localStore->parseStorePath(row["drvPath"].as()); build->projectName = row["project"].as(); build->jobsetName = row["jobset"].as(); build->jobName = row["job"].as(); @@ -402,8 +402,7 @@ Step::ptr State::createStep(ref destStore, /* If it doesn't exist, create it. */ if (!step) { - step = std::make_shared(); - step->drvPath = drvPath.clone(); + step = std::make_shared(drvPath.clone()); isNew = true; } diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index de74b768..180907e9 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -136,6 +136,9 @@ struct Build std::atomic_bool finishedInDB{false}; + Build(nix::StorePath && drvPath) : drvPath(std::move(drvPath)) + { } + std::string fullJobName() { return projectName + ":" + jobsetName + ":" + jobName; @@ -201,6 +204,9 @@ struct Step nix::Sync state; + Step(nix::StorePath && drvPath) : drvPath(std::move(drvPath)) + { } + ~Step() { //printMsg(lvlError, format("destroying step %1%") % drvPath);