diff options
| author | Per Larsson <[email protected]> | 2021-09-23 08:24:13 +0200 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-09-23 08:24:13 +0200 |
| commit | a90c4fd0d6c4c18c24efc60fe26f2f043c7221be (patch) | |
| tree | 0d8718e871eb83546d367198839fc16a4a72933a | |
| parent | Clang format fix. (diff) | |
| download | zen-a90c4fd0d6c4c18c24efc60fe26f2f043c7221be.tar.xz zen-a90c4fd0d6c4c18c24efc60fe26f2f043c7221be.zip | |
Use /check/health instead of /test/hello.
| -rw-r--r-- | zenserver/upstream/upstreamcache.cpp | 4 | ||||
| -rw-r--r-- | zenserver/upstream/zen.cpp | 4 | ||||
| -rw-r--r-- | zenserver/upstream/zen.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp index a889fb984..9d43462c0 100644 --- a/zenserver/upstream/upstreamcache.cpp +++ b/zenserver/upstream/upstreamcache.cpp @@ -317,9 +317,9 @@ namespace detail { ZenStructuredCacheSession Session(*m_Client); ZenCacheResult Result; - for (int32_t Attempt = 0, MaxAttempts = 3; Attempt < MaxAttempts && !Result.Success; ++Attempt) + for (int32_t Attempt = 0, MaxAttempts = 2; Attempt < MaxAttempts && !Result.Success; ++Attempt) { - Result = Session.SayHello(); + Result = Session.CheckHealth(); } m_HealthOk = Result.ErrorCode == 0; diff --git a/zenserver/upstream/zen.cpp b/zenserver/upstream/zen.cpp index 710d381c6..530bed32a 100644 --- a/zenserver/upstream/zen.cpp +++ b/zenserver/upstream/zen.cpp @@ -382,10 +382,10 @@ ZenStructuredCacheSession::~ZenStructuredCacheSession() } ZenCacheResult -ZenStructuredCacheSession::SayHello() +ZenStructuredCacheSession::CheckHealth() { ExtendableStringBuilder<256> Uri; - Uri << m_Client.ServiceUrl() << "/test/hello"; + Uri << m_Client.ServiceUrl() << "/health/check"; cpr::Session& Session = m_SessionState->Session; Session.SetOption(cpr::Url{Uri.c_str()}); diff --git a/zenserver/upstream/zen.h b/zenserver/upstream/zen.h index 48886096d..158be668a 100644 --- a/zenserver/upstream/zen.h +++ b/zenserver/upstream/zen.h @@ -111,7 +111,7 @@ public: ZenStructuredCacheSession(ZenStructuredCacheClient& OuterClient); ~ZenStructuredCacheSession(); - ZenCacheResult SayHello(); + ZenCacheResult CheckHealth(); ZenCacheResult GetCacheRecord(std::string_view BucketId, const IoHash& Key, ZenContentType Type); ZenCacheResult GetCachePayload(std::string_view BucketId, const IoHash& Key, const IoHash& PayloadId); ZenCacheResult PutCacheRecord(std::string_view BucketId, const IoHash& Key, IoBuffer Value, ZenContentType Type); |