From 0f5fe4c2e2e7219f59de1774d8b10d30c1aa298f Mon Sep 17 00:00:00 2001 From: Dmitry Potepalov Date: Tue, 17 Dec 2024 17:15:15 +0100 Subject: [PATCH 1/2] Reduce the length of log debug line --- pghoard/webserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pghoard/webserver.py b/pghoard/webserver.py index b09d44e1..22671cb1 100644 --- a/pghoard/webserver.py +++ b/pghoard/webserver.py @@ -621,7 +621,7 @@ def handle_archival_request(self, site, filename, filetype): xlog_path = os.path.join(xlog_dir, filename) self.server.log.debug("Got request to archive: %r %r %r, %r", site, filetype, filename, xlog_path) if not self._is_valid_xlog_path(xlog_path): - self.server.log.debug("xlog_path: %r did not exist or contains symlinks, cannot archive, returning 404", xlog_path) + self.server.log.debug("xlog_path: %r did not exist or is symlink, cannot archive, returning 404", xlog_path) raise HttpResponse("N/A", status=404) if filetype == "xlog": From 92473699b6f3d072aca5b34028f3af9236998717 Mon Sep 17 00:00:00 2001 From: Dmitry Potepalov Date: Tue, 17 Dec 2024 17:20:21 +0100 Subject: [PATCH 2/2] Remove extra line that does not match formatting --- pghoard/webserver.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pghoard/webserver.py b/pghoard/webserver.py index 22671cb1..b76b1fe8 100644 --- a/pghoard/webserver.py +++ b/pghoard/webserver.py @@ -516,7 +516,6 @@ def _is_valid_xlog_path(xlog_path_str: str) -> bool: xlog_path = Path(xlog_path_str) return xlog_path.is_file() and not xlog_path.is_symlink() - def get_wal_or_timeline_file(self, site: str, filename: str, filetype: str) -> None: target_path = self.headers.get("x-pghoard-target-path") if not target_path: