aboutsummaryrefslogtreecommitdiffstats
path: root/miss_htbt_service/htbtworker.py
diff options
context:
space:
mode:
authorSrikanthNaidu <sn8492@att.com>2018-12-19 19:06:39 +0530
committerSrikanthNaidu <sn8492@att.com>2018-12-19 19:06:39 +0530
commite011cf052edad0e70ce2846d483fa29f6283bef3 (patch)
treeed8ac40b06cbf4e94f13f15c31602b2378f36abb /miss_htbt_service/htbtworker.py
parent20110ffeb5071193e7b437e797636d9d6318dcd4 (diff)
heartbeat service Logging complaincepgcode-optimization
All components deployed should conform to ONAP logging guidelines Issue-ID: DCAEGEN2-628 Change-Id: I2febe2456033f3aa2961fcb2f656b64b1515cd03 Signed-off-by: SrikanthNaidu <sn8492@att.com>
Diffstat (limited to 'miss_htbt_service/htbtworker.py')
-rw-r--r--miss_htbt_service/htbtworker.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/miss_htbt_service/htbtworker.py b/miss_htbt_service/htbtworker.py
index 5b62943..6000e1b 100644
--- a/miss_htbt_service/htbtworker.py
+++ b/miss_htbt_service/htbtworker.py
@@ -44,7 +44,7 @@ def read_json_file(i):
def process_msg(jsfile,user_name, password, ip_address, port_num, db_name):
global mr_url
i=0
- sleep_duration = 10
+ sleep_duration = 20
while(True):
time.sleep(sleep_duration)
with open(jsfile, 'r') as outfile:
@@ -61,6 +61,7 @@ def process_msg(jsfile,user_name, password, ip_address, port_num, db_name):
if(os.getenv('pytest', "") == 'test'):
eventnameList = ["Heartbeat_vDNS","Heartbeat_vFW","Heartbeat_xx"]
+ connection_db = 0
else:
connection_db = postgres_db_open(user_name, password, ip_address, port_num, db_name)
cur = connection_db.cursor()
@@ -93,8 +94,6 @@ def process_msg(jsfile,user_name, password, ip_address, port_num, db_name):
inputString = res.text
#If mrstatus in message body indicates some information, not json msg.
if ("mrstatus" in inputString):
- if (sleep_duration < 60):
- sleep_duration = sleep_duration + 10
continue
jlist = inputString.split('\n');
# Process the DMaaP input message retreived