diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-15 12:35:05 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-19 09:50:37 +0200 |
commit | 0b848592a8d84e3b3bda23584308ab24965e55ca (patch) | |
tree | 58941bcf4007c4478986344551218019927df51d /src/buildtool/common/remote/retry.hpp | |
parent | 68f5518b10108af6abadfe709af4e203d388b834 (diff) | |
download | justbuild-0b848592a8d84e3b3bda23584308ab24965e55ca.tar.gz |
Fix naming inconsistencies in retry configuration
The retry_parameters.hpp header-only library defining the Retry
class now is the retry_config.hpp header-only library defining the
RetryConfig class.
Diffstat (limited to 'src/buildtool/common/remote/retry.hpp')
-rw-r--r-- | src/buildtool/common/remote/retry.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buildtool/common/remote/retry.hpp b/src/buildtool/common/remote/retry.hpp index b9298588..6e164af1 100644 --- a/src/buildtool/common/remote/retry.hpp +++ b/src/buildtool/common/remote/retry.hpp @@ -20,7 +20,7 @@ #include <utility> // std::move #include "grpcpp/grpcpp.h" -#include "src/buildtool/common/remote/retry_parameters.hpp" +#include "src/buildtool/common/remote/retry_config.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" @@ -56,7 +56,7 @@ template <CallableReturningRetryResponse F> [[nodiscard]] auto WithRetry(F const& f, Logger const& logger) noexcept -> bool { try { - auto const& attempts = Retry::GetMaxAttempts(); + auto const& attempts = RetryConfig::GetMaxAttempts(); for (auto attempt = 1U; attempt <= attempts; ++attempt) { auto [ok, fatal, error_msg] = f(); if (ok) { @@ -71,7 +71,7 @@ template <CallableReturningRetryResponse F> // don't wait if it was the last attempt if (attempt < attempts) { auto const sleep_for_seconds = - Retry::GetSleepTimeSeconds(attempt); + RetryConfig::GetSleepTimeSeconds(attempt); logger.Emit(kRetryLogLevel, "Attempt {}/{} failed{} Retrying in {} seconds.", attempt, @@ -107,7 +107,7 @@ template <CallableReturningGrpcStatus F> -> std::pair<bool, grpc::Status> { grpc::Status status{}; try { - auto attempts = Retry::GetMaxAttempts(); + auto attempts = RetryConfig::GetMaxAttempts(); for (auto attempt = 1U; attempt <= attempts; ++attempt) { status = f(); if (status.ok() or @@ -117,7 +117,7 @@ template <CallableReturningGrpcStatus F> // don't wait if it was the last attempt if (attempt < attempts) { auto const sleep_for_seconds = - Retry::GetSleepTimeSeconds(attempt); + RetryConfig::GetSleepTimeSeconds(attempt); logger.Emit( kRetryLogLevel, "Attempt {}/{} failed: {}: {}: Retrying in {} seconds.", |