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 <rikingcoding@gmail.com>
This commit is contained in:
Griffin Smith 2020-07-16 21:11:07 -04:00 committed by glittershark
parent 1b07e588c8
commit d18246f8b2

View file

@ -1,4 +1,6 @@
#include <google/protobuf/empty.pb.h>
#include <google/protobuf/util/time_util.h>
#include <grpcpp/impl/codegen/server_context.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/status_code_enum.h>
@ -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<Path> targets;