From 5e4ea155f6766e19d245173a10d15ebe3618c9d1 Mon Sep 17 00:00:00 2001 From: PrakashH Date: Wed, 30 Jan 2019 06:20:06 +0000 Subject: Heartbeat Microservice Support Heartbeat service monitors missing HB notifications Issue-ID: DCAEGEN2-267 Change-Id: I08046dc804e2e927ef03865d22940016acd00656 Signed-off-by: PrakashH --- miss_htbt_service/htbtworker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miss_htbt_service/htbtworker.py b/miss_htbt_service/htbtworker.py index cb7465c..6dbd6cd 100644 --- a/miss_htbt_service/htbtworker.py +++ b/miss_htbt_service/htbtworker.py @@ -97,13 +97,17 @@ def process_msg(jsfile,user_name, password, ip_address, port_num, db_name): continue jlist = inputString.split('\n'); # Process the DMaaP input message retreived + error = False for line in jlist: try: jobj = json.loads(line) except ValueError: msg='HBT:Decoding JSON has failed' _logger.error(msg) - continue + error = True + break + if (error == True): + continue if len(jobj) == 0: continue for item in jobj: -- cgit 1.2.3-korg