From: tierno Date: Wed, 5 Feb 2020 15:08:32 +0000 (+0000) Subject: Relax healthcheck to allow losing non consecutive kafka pings X-Git-Tag: v7.0.1~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=8c16b0528c492494e7fe1788f713f720f31d9da9;p=osm%2FLCM.git Relax healthcheck to allow losing non consecutive kafka pings Change-Id: I61fc8f28b2342c545e66ef5f6a8ec96ca46d7a49 Signed-off-by: tierno --- diff --git a/osm_lcm/lcm.py b/osm_lcm/lcm.py index 8cd15e83..e15df9f8 100644 --- a/osm_lcm/lcm.py +++ b/osm_lcm/lcm.py @@ -612,7 +612,7 @@ def health_check(): with open(health_check_file, "r") as f: last_received_ping = f.read() - if time() - float(last_received_ping) < Lcm.ping_interval_pace + 10: + if time() - float(last_received_ping) < 2 * Lcm.ping_interval_pace: # allow one ping not received every two exit(0) except Exception: pass @@ -624,7 +624,7 @@ def health_check(): if __name__ == '__main__': try: - print("SYS.PATH='{}'".format(sys.path)) + # print("SYS.PATH='{}'".format(sys.path)) # load parameters and configuration # -h # -c value