summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/operations_server.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-15 10:19:16 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-19 09:50:37 +0200
commita5f048e3b2504959994cc9545a70fde01b70d99a (patch)
tree42ef3e92abdba766e4c56ed8e0dbfff37de22416 /src/buildtool/execution_api/execution_service/operations_server.cpp
parent1acde5fa1f37b8e4856f96aba092a38faaac737f (diff)
downloadjustbuild-a5f048e3b2504959994cc9545a70fde01b70d99a.tar.gz
Make OperationCache a general class, not singleton
As it is used by just execute only, instantiate it inside the ExecutionServer, which reads and writes to the cache map, and pass a const ref to OperationsServer, which only queries.
Diffstat (limited to 'src/buildtool/execution_api/execution_service/operations_server.cpp')
-rw-r--r--src/buildtool/execution_api/execution_service/operations_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildtool/execution_api/execution_service/operations_server.cpp b/src/buildtool/execution_api/execution_service/operations_server.cpp
index 6e082bf4..23023c7d 100644
--- a/src/buildtool/execution_api/execution_service/operations_server.cpp
+++ b/src/buildtool/execution_api/execution_service/operations_server.cpp
@@ -29,7 +29,7 @@ auto OperarationsServiceImpl::GetOperation(
}
logger_.Emit(LogLevel::Trace, "GetOperation: {}", hash);
std::optional<::google::longrunning::Operation> op;
- op = OperationCache::Query(hash);
+ op = op_cache_.Query(hash);
if (!op) {
auto const& str = fmt::format(
"Executing action {} not found in internal cache.", hash);