diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-17 16:14:12 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-19 09:50:37 +0200 |
commit | c8394c2ffc3688356cf985d46e8ce56d72050f6a (patch) | |
tree | 2a5deb6ed40f3e8daca90c02711cbc3aba3f548c /src/other_tools/just_mr/fetch.cpp | |
parent | 31b782119138859c29ac8ff54bcfe19aa00fca42 (diff) | |
download | justbuild-c8394c2ffc3688356cf985d46e8ce56d72050f6a.tar.gz |
Remove the RetryConfig singleton
...and replace it with instances created early via a builder
pattern.
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 9774f0d6..ed585d80 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -28,6 +28,7 @@ #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" +#include "src/buildtool/main/retry.hpp" #include "src/buildtool/multithreading/task_system.hpp" #include "src/buildtool/serve_api/remote/config.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" @@ -47,6 +48,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, MultiRepoSetupArguments const& setup_args, MultiRepoFetchArguments const& fetch_args, MultiRepoRemoteAuthArguments const& auth_args, + RetryArguments const& retry_args, StorageConfig const& storage_config, Storage const& storage, std::string multi_repository_tool_name) -> int { @@ -418,13 +420,19 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, return kExitConfigError; } + // setup the retry config + auto retry_config = CreateRetryConfig(retry_args); + if (not retry_config) { + return kExitConfigError; + } + // setup the APIs for archive fetches; only happens if in native mode ApiBundle const apis{&storage_config, &storage, &*local_exec_config, /*repo_config=*/nullptr, &*auth_config, - &RetryConfig::Instance(), + &*retry_config, &*remote_exec_config}; bool const has_remote_api = |