From d18246f8b2633602b8a05320c2b3167fd0ad4a6d Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Thu, 16 Jul 2020 21:11:07 -0400 Subject: feat(3p/nix/nix-daemon): Implement Worker::OptimiseStore handler Change-Id: I8b1d84799a608a516d0b4980022a7edd545a1ca1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1235 Tested-by: BuildkiteCI Reviewed-by: Kane York --- third_party/nix/src/nix-daemon/nix-daemon-proto.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'third_party/nix/src') diff --git a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc index 7344811eeac4..3740a26b8f85 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc @@ -1,4 +1,6 @@ +#include #include +#include #include #include @@ -184,6 +186,13 @@ class WorkerServiceImpl final : public WorkerService::Service { return Status::OK; } + Status OptimiseStore(grpc::ServerContext* context, + const google::protobuf::Empty* request, + google::protobuf::Empty* response) override { + store_->optimiseStore(); + return Status::OK; + } + Status QueryMissing(grpc::ServerContext* context, const StorePaths* request, nix::proto::QueryMissingResponse* response) override { std::set targets; -- cgit 1.4.1