diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-16 17:30:36 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-19 09:50:37 +0200 |
commit | 616cd734e76b7f4c9666bbaeaa6820fa9980816d (patch) | |
tree | ad9f43d86c3dc88b61c213625c625dbf20f7a167 /src/buildtool/execution_api/common/api_bundle.cpp | |
parent | 4e2e6585441cc69b2c2ebc29b9ca95e1804b5053 (diff) | |
download | justbuild-616cd734e76b7f4c9666bbaeaa6820fa9980816d.tar.gz |
Pass RetryConfig instance to ApiBundle
Also store a const ref for usage in setting up a fresh ApiBundle
during target serve.
Diffstat (limited to 'src/buildtool/execution_api/common/api_bundle.cpp')
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index ba4a434c..38255f9a 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -25,13 +25,15 @@ ApiBundle::ApiBundle( gsl::not_null<LocalExecutionConfig const*> const& local_exec_config, RepositoryConfig const* repo_config, gsl::not_null<Auth const*> const& authentication, + gsl::not_null<RetryConfig const*> const& retry_config, gsl::not_null<RemoteExecutionConfig const*> const& remote_exec_config) : local{std::make_shared<LocalApi>(storage_config, storage, local_exec_config, repo_config)}, // needed by remote auth{*authentication}, // needed by remote - remote_config{*remote_exec_config}, // needed by remote + retry_config{*retry_config}, // needed by remote + remote_config{*remote_exec_config}, remote{CreateRemote(remote_exec_config->remote_address)} {} auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const @@ -43,7 +45,7 @@ auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const address->host, address->port, &auth, - &RetryConfig::Instance(), + &retry_config, config); } return local; |