From 728afdd34a698e065240b0650e73ab394fa2e8f2 Mon Sep 17 00:00:00 2001 From: Vincent Kling Date: Tue, 8 Nov 2022 16:51:35 +0100 Subject: [PATCH] Add basic logging for FETCHMAIL_ENABLED and FETCHMAIL_DELAY --- optional/fetchmail/fetchmail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/optional/fetchmail/fetchmail.py b/optional/fetchmail/fetchmail.py index 2afd103b..dfac6d2d 100755 --- a/optional/fetchmail/fetchmail.py +++ b/optional/fetchmail/fetchmail.py @@ -95,9 +95,12 @@ def run(debug): if __name__ == "__main__": while True: - time.sleep(int(os.environ.get("FETCHMAIL_DELAY", 60))) + delay = int(os.environ.get("FETCHMAIL_DELAY", 60)) + print("Sleeping for {} seconds".format(delay)) + time.sleep(delay) if not os.environ.get("FETCHMAIL_ENABLED", 'True') in ('True', 'true'): + print("Fetchmail disabled, skipping...") continue run(os.environ.get("DEBUG", None) == "True")