Skip to content

Commit

Permalink
refactor: rename method #295
Browse files Browse the repository at this point in the history
  • Loading branch information
fengelniederhammer committed Feb 26, 2024
1 parent b17f72a commit bddc6e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/silo_api/error_request_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ErrorRequestHandler : public Poco::Net::HTTPRequestHandler {
) override;

private:
std::optional<std::string> computeRetryAfter();
std::optional<std::string> computeRetryAfterHintForStartupTime();
};

}; // namespace silo_api
2 changes: 1 addition & 1 deletion src/silo_api/database_directory_watcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/silo_api/error_request_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down Expand Up @@ -68,7 +68,7 @@ void ErrorRequestHandler::handleRequest(
}
}

std::optional<std::string> ErrorRequestHandler::computeRetryAfter() {
std::optional<std::string> ErrorRequestHandler::computeRetryAfterHintForStartupTime() {
if (!startup_config.estimated_startup_time.has_value()) {
return std::nullopt;
}
Expand Down

0 comments on commit bddc6e9

Please sign in to comment.