From dac22d93c804780f2dc20164aeb44fc80a30890d Mon Sep 17 00:00:00 2001 From: "Hansen, Tony (th1395)" Date: Fri, 19 Aug 2022 12:56:56 +0000 Subject: lots of cleanup, no functional code changes Change-Id: I9eefe4d34ae226bbd5a6f80422f89baeeaeb3471 Signed-off-by: Hansen, Tony (th1395) Issue-ID: DCAEGEN2-2837 --- miss_htbt_service/cbs_polling.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'miss_htbt_service/cbs_polling.py') diff --git a/miss_htbt_service/cbs_polling.py b/miss_htbt_service/cbs_polling.py index 53585ba..f837735 100644 --- a/miss_htbt_service/cbs_polling.py +++ b/miss_htbt_service/cbs_polling.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # ============LICENSE_START======================================================= -# Copyright (c) 2018-2021 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2022 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. # Copyright (c) 2020 Deutsche Telekom. All rights reserved. # Copyright (c) 2021 Fujitsu Ltd. @@ -44,21 +44,21 @@ def poll_cbs(current_pid: int) -> None: cbs_polling_required, cbs_polling_interval, ) = db.read_hb_properties(jsfile) - hbc_pid, hbc_state, hbc_srcName, hbc_time = db.read_hb_common(user_name, password, ip_address, port_num, db_name) + hbc_pid, hbc_state, hbc_src_name, hbc_time = db.read_hb_common(user_name, password, ip_address, port_num, db_name) msg = "CBSP:Main process ID in hb_common is %d", hbc_pid _logger.info(msg) msg = "CBSP:My parent process ID is %d", current_pid _logger.info(msg) msg = "CBSP:CBS Polling interval is %d", cbs_polling_interval _logger.info(msg) - envPytest = os.getenv("pytest", "") - if envPytest == "test": + env_pytest = os.getenv("pytest", "") + if env_pytest == "test": cbs_polling_interval = "30" time.sleep(int(cbs_polling_interval)) - hbc_pid, hbc_state, hbc_srcName, hbc_time = db.read_hb_common(user_name, password, ip_address, port_num, db_name) + hbc_pid, hbc_state, hbc_src_name, hbc_time = db.read_hb_common(user_name, password, ip_address, port_num, db_name) source_name = socket.gethostname() source_name = source_name + "-" + str(os.getenv("SERVICE_NAME", "")) - if current_pid == int(hbc_pid) and source_name == hbc_srcName and hbc_state == "RUNNING": + if current_pid == int(hbc_pid) and source_name == hbc_src_name and hbc_state == "RUNNING": _logger.info("CBSP:ACTIVE Instance:Change the state to RECONFIGURATION") state = "RECONFIGURATION" update_flg = 1 -- cgit 1.2.3-korg