aboutsummaryrefslogtreecommitdiffstats
path: root/miss_htbt_service/cbs_polling.py
diff options
context:
space:
mode:
authorHansen, Tony (th1395) <th1395@att.com>2022-08-19 12:56:56 +0000
committerHansen, Tony (th1395) <th1395@att.com>2022-08-19 12:57:10 +0000
commitdac22d93c804780f2dc20164aeb44fc80a30890d (patch)
tree7bd19b04ffa5e8fb049068d9de79778eeed140de /miss_htbt_service/cbs_polling.py
parent554b15356ef100a3617f7f5415f6a35ac2b3ebba (diff)
lots of cleanup, no functional code changes
Change-Id: I9eefe4d34ae226bbd5a6f80422f89baeeaeb3471 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Issue-ID: DCAEGEN2-2837
Diffstat (limited to 'miss_htbt_service/cbs_polling.py')
-rw-r--r--miss_htbt_service/cbs_polling.py12
1 files changed, 6 insertions, 6 deletions
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