From aa255978b776a8521929287b3b4c3a5eb30b669d Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Tue, 8 Jul 2025 20:57:26 +0200 Subject: [PATCH] Snappea: refuse to start in TASK_ALWAYS_EAGER mode --- snappea/foreman.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snappea/foreman.py b/snappea/foreman.py index 3f7f6e4..6217342 100644 --- a/snappea/foreman.py +++ b/snappea/foreman.py @@ -97,6 +97,12 @@ class Foreman: logger.info(" ========= SNAPPEA =========") + if self.settings.TASK_ALWAYS_EAGER: + # Exiting _mostly_ because of a matter of intent: this combination of settings/actions makes so little sense + # that it can't really be intentional. It's also probably broken (or in any case: not tested to work) + logger.info("Startup: Can't run Foreman in TASK_ALWAYS_EAGER mode, EXIT") + sys.exit(1) + # if the PID_FILE already exists, read it to see whether snappea is already running. # this implementation is not supposed to be bullet-proof for race conditions (nor is it cross-platform)... it's # just a small check to prevent the regularly occurring cases: