From a5f048e3b2504959994cc9545a70fde01b70d99a Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 15 Jul 2024 10:19:16 +0200 Subject: 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. --- src/buildtool/execution_api/execution_service/operations_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/execution_service/operations_server.cpp') 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); -- cgit v1.2.3