summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/server_implementation.cpp
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2023-02-27 10:27:52 +0100
committerAlberto Sartori <alberto.sartori@huawei.com>2023-03-10 09:38:39 +0100
commit55ba09ec97d2449b39d7fcc38c346969168d899b (patch)
tree4c97affeaae2e5bb88a41be6d389b2502bae6e24 /src/buildtool/execution_api/execution_service/server_implementation.cpp
parent117a1dbf099d93dfe044971f90203a5d8d1975b4 (diff)
downloadjustbuild-55ba09ec97d2449b39d7fcc38c346969168d899b.tar.gz
execution service: implement WaitExecution and google::longrunning::Operations::GetOperation
For each action that is executed, an entry is added to a shared thread safe cache. Once the number of operations stored exceeds twice 2^n, where n is given by the option --log-operations-threshold, at most 2^n operations will be removed, in a FIFO scheme.
Diffstat (limited to 'src/buildtool/execution_api/execution_service/server_implementation.cpp')
-rw-r--r--src/buildtool/execution_api/execution_service/server_implementation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buildtool/execution_api/execution_service/server_implementation.cpp b/src/buildtool/execution_api/execution_service/server_implementation.cpp
index 73850686..bba2e4cf 100644
--- a/src/buildtool/execution_api/execution_service/server_implementation.cpp
+++ b/src/buildtool/execution_api/execution_service/server_implementation.cpp
@@ -29,6 +29,7 @@
#include "src/buildtool/execution_api/execution_service/capabilities_server.hpp"
#include "src/buildtool/execution_api/execution_service/cas_server.hpp"
#include "src/buildtool/execution_api/execution_service/execution_server.hpp"
+#include "src/buildtool/execution_api/execution_service/operations_server.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/logging/logger.hpp"
@@ -53,6 +54,7 @@ auto ServerImpl::Run() -> bool {
CASServiceImpl cas{};
BytestreamServiceImpl b{};
CapabilitiesServiceImpl cap{};
+ OperarationsServiceImpl op{};
grpc::ServerBuilder builder;
@@ -60,7 +62,8 @@ auto ServerImpl::Run() -> bool {
.RegisterService(&ac)
.RegisterService(&cas)
.RegisterService(&b)
- .RegisterService(&cap);
+ .RegisterService(&cap)
+ .RegisterService(&op);
std::shared_ptr<grpc::ServerCredentials> creds;
if (Auth::GetAuthMethod() == AuthMethod::kTLS) {