From b0ea486302dcdac20829150334ef037efc56fe68 Mon Sep 17 00:00:00 2001 From: tcely Date: Wed, 26 Feb 2025 07:39:23 -0500 Subject: [PATCH] Prevent unintended unhealthy restarts When I intentionally set a test container to be down, I really don't want it to be restarted because it was "unhealthy" for too long --- tubesync/healthcheck.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tubesync/healthcheck.py b/tubesync/healthcheck.py index 5bc127b0..0826b7bb 100755 --- a/tubesync/healthcheck.py +++ b/tubesync/healthcheck.py @@ -30,6 +30,9 @@ def do_heatlhcheck(url): if __name__ == '__main__': + # if it is marked as intentionally down, nothing else matters + if os.path.exists('/run/service/gunicorn/down'): + sys.exit(0) try: url = sys.argv[1] except IndexError: