From e3d86a0fdded668552f38bc2b82c33038ff1fcfe Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Mon, 26 Feb 2024 14:19:50 +0100 Subject: [PATCH] refactor: rename method #295 --- include/silo_api/error_request_handler.h | 2 +- src/silo_api/database_directory_watcher.cpp | 2 +- src/silo_api/error_request_handler.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/silo_api/error_request_handler.h b/include/silo_api/error_request_handler.h index 3e4d633b3..83621e2e5 100644 --- a/include/silo_api/error_request_handler.h +++ b/include/silo_api/error_request_handler.h @@ -39,7 +39,7 @@ class ErrorRequestHandler : public Poco::Net::HTTPRequestHandler { ) override; private: - std::optional computeRetryAfter(); + std::optional computeRetryAfterHintForStartupTime(); }; }; // namespace silo_api diff --git a/src/silo_api/database_directory_watcher.cpp b/src/silo_api/database_directory_watcher.cpp index c970d5e88..adb0957a5 100644 --- a/src/silo_api/database_directory_watcher.cpp +++ b/src/silo_api/database_directory_watcher.cpp @@ -133,7 +133,7 @@ void silo_api::DatabaseDirectoryWatcher::checkDirectoryForData(Poco::Timer& /*ti return; } } catch (const silo_api::UninitializedDatabaseException& exception) { - SPDLOG_DEBUG("No database loaded yet - continuing to load initial database."); + SPDLOG_DEBUG("No database loaded yet - loading initial database next."); } } diff --git a/src/silo_api/error_request_handler.cpp b/src/silo_api/error_request_handler.cpp index ba3286208..3df952f5a 100644 --- a/src/silo_api/error_request_handler.cpp +++ b/src/silo_api/error_request_handler.cpp @@ -32,7 +32,7 @@ void ErrorRequestHandler::handleRequest( response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_SERVICE_UNAVAILABLE); std::string message = "Database not initialized yet."; - const auto retry_after = computeRetryAfter(); + const auto retry_after = computeRetryAfterHintForStartupTime(); if (retry_after.has_value()) { response.set("Retry-After", retry_after.value()); message += " Please try again after " + retry_after.value() + " seconds."; @@ -68,7 +68,7 @@ void ErrorRequestHandler::handleRequest( } } -std::optional ErrorRequestHandler::computeRetryAfter() { +std::optional ErrorRequestHandler::computeRetryAfterHintForStartupTime() { if (!startup_config.estimated_startup_time.has_value()) { return std::nullopt; }