Skip to content

Commit

Permalink
Begin factoring out the protocol code
Browse files Browse the repository at this point in the history
Use `nix::serve_proto::queryValidPaths`.
  • Loading branch information
Ericson2314 committed Feb 20, 2022
1 parent d8a6eec commit ce36d10
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/hydra-queue-runner/build-remote.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,11 @@ static void copyClosureTo(std::timed_mutex & sendMutex, Store & destStore,
garbage-collect paths that are already there. Optionally, ask
the remote host to substitute missing paths. */
// FIXME: substitute output pollutes our build log
conn.to << cmdQueryValidPaths << 1 << useSubstitutes;
worker_proto::write(destStore, conn.to, closure);
conn.to.flush();

/* Get back the set of paths that are already valid on the remote
host. */
auto present = worker_proto::read(destStore, conn.from, Phantom<StorePathSet> {});
auto present = serve_proto::queryValidPaths(
conn, destStore,
true, closure, useSubstitutes);

if (present.size() == closure.size()) return;

Expand Down

0 comments on commit ce36d10

Please sign in to comment.