diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 17:36:52 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-23 22:42:06 +0000 |
commit | 450c3500f1e3fb619636c0a29d65300020f99d7d (patch) | |
tree | 620e7ae0f444e3b8e4072f67beed10ed25a3490f /src/libstore/build/worker.cc | |
parent | 12f7a1f65becfe3b036d0f840ee4a05f2f1f857c (diff) |
Crudely make worker only provide a Store, not LocalStore
We downcast in a few places, this will be refactored to be better later.
Diffstat (limited to 'src/libstore/build/worker.cc')
-rw-r--r-- | src/libstore/build/worker.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 6c96a93bd..a9575fb0f 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -8,7 +8,7 @@ namespace nix { -Worker::Worker(LocalStore & store) +Worker::Worker(Store & store) : act(*logger, actRealise) , actDerivations(*logger, actBuilds) , actSubstitutions(*logger, actCopyPaths) @@ -229,7 +229,9 @@ void Worker::run(const Goals & _topGoals) checkInterrupt(); - store.autoGC(false); + // TODO GC interface? + if (auto localStore = dynamic_cast<LocalStore *>(&store)) + localStore->autoGC(false); /* Call every wake goal (in the ordering established by CompareGoalPtrs). */ |