Update to reflect BinaryCacheStore changes

BinaryCacheStore no longer implements buildPaths() and ensurePath(),
so we need to use copyPath() / copyClosure().
This commit is contained in:
Eelco Dolstra
2016-10-07 20:23:05 +02:00
parent fb0d2d2dda
commit ee2e9f5335
5 changed files with 46 additions and 32 deletions

View File

@ -71,12 +71,6 @@ MaintainCount State::startDbUpdate()
}
ref<Store> State::getLocalStore()
{
return ref<Store>(_localStore);
}
ref<Store> State::getDestStore()
{
return ref<Store>(_destStore);
@ -797,14 +791,20 @@ void State::run(BuildID buildOne)
if (!lock)
throw Error("hydra-queue-runner is already running");
_localStore = openStore();
localStore = openStore();
if (hydraConfig["store_uri"] == "") {
_destStore = _localStore;
_destStore = localStore;
} else {
_destStore = openStoreAt(hydraConfig["store_uri"]);
}
auto isTrue = [](const std::string & s) {
return s == "1" || s == "true";
};
useSubstitutes = isTrue(hydraConfig["use-substitutes"]);
{
auto conn(dbPool.get());
clearBusy(*conn, 0);