From 9c62890f09cef75a7d35afd65e39de9022fb4c99 Mon Sep 17 00:00:00 2001 From: Carsten Hinz <c.hinz@fz-juelich.de> Date: Mon, 13 May 2024 09:51:00 +0200 Subject: [PATCH] added output for request vs using already downloaded data --- toargridding/toar_rest_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toargridding/toar_rest_client.py b/toargridding/toar_rest_client.py index 1ed3a57..7bd52a2 100644 --- a/toargridding/toar_rest_client.py +++ b/toargridding/toar_rest_client.py @@ -443,9 +443,12 @@ class AnalysisServiceDownload(AnalysisService): needs_fresh_download = (not self.use_downloaded) or (not filename.is_file()) if needs_fresh_download: + print("Performing request to TOAR DB") response = self.connection.get(query_options) with open(filename, "w+b") as downloaded_file: downloaded_file.write(response.content) + else: + print(f"Loading already downloaded data from {filename}") with open(filename, "r+b") as data_file: content = data_file.read() -- GitLab