diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2020-07-27 10:02:19 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2020-07-31 13:21:08 +0000 |
commit | e97a5ce265f7e1d3380fab9c4132e2b002e8636c (patch) | |
tree | 416c4c60a339419d06b6ae165b9231c16fa44f45 /miss_htbt_service/misshtbtd.py | |
parent | a9e77b57b3c1f326ddf6f29e2c89765344e53b99 (diff) |
Run in Python 3.8
Use image recommended by SECCOM
Issue-ID: DCAEGEN2-2292
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I8d77f150c9fe314bf26bac2c9fac7ebc9782c9d8
Diffstat (limited to 'miss_htbt_service/misshtbtd.py')
-rw-r--r-- | miss_htbt_service/misshtbtd.py | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/miss_htbt_service/misshtbtd.py b/miss_htbt_service/misshtbtd.py index c56ad99..0edc76e 100644 --- a/miss_htbt_service/misshtbtd.py +++ b/miss_htbt_service/misshtbtd.py @@ -2,6 +2,7 @@ # ============LICENSE_START======================================================= # Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. +# Copyright 2020 Deutsche Telekom. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,13 +40,13 @@ import socket import os.path as path from pathlib import Path -from . import htbtworker as heartbeat -from . import get_logger -from .mod import trapd_settings as tds -from .mod.trapd_runtime_pid import save_pid, rm_pid -from .mod.trapd_get_cbs_config import get_cbs_config -from .mod.trapd_exit import cleanup_and_exit -from .mod.trapd_http_session import init_session_obj +import htbtworker as heartbeat +import get_logger +from mod import trapd_settings as tds +from mod.trapd_runtime_pid import save_pid, rm_pid +from mod.trapd_get_cbs_config import get_cbs_config +from mod.trapd_exit import cleanup_and_exit +from mod.trapd_http_session import init_session_obj hb_properties_file = path.abspath(path.join(__file__, "../config/hbproperties.yaml")) ip_address = "localhost" @@ -196,18 +197,18 @@ def create_update_vnf_table_1(jsfile,update_db,connection_db): def hb_cbs_polling_process(pid_current): my_file = Path("./miss_htbt_service/cbs_polling.py") # if my_file.is_file(): - subprocess.call(["python3.6",ABSOLUTE_PATH4 , str(pid_current) ]) + subprocess.call(["python3.8",ABSOLUTE_PATH4 , str(pid_current) ]) # else: -# subprocess.call(["python3.6",ABSOLUTE_PATH4 , str(pid_current) ]) +# subprocess.call(["python3.8",ABSOLUTE_PATH4 , str(pid_current) ]) sys.stdout.flush() _logger.info("MSHBT:Creaated CBS polling process") return def hb_worker_process(config_file_path): my_file = Path("./miss_htbt_service/htbtworker.py") # if my_file.is_file(): - subprocess.call(["python3.6",ABSOLUTE_PATH1 , config_file_path ]) + subprocess.call(["python3.8",ABSOLUTE_PATH1 , config_file_path ]) # else: -# subprocess.call(["python3.6",ABSOLUTE_PATH1 , config_file_path ]) +# subprocess.call(["python3.8",ABSOLUTE_PATH1 , config_file_path ]) sys.stdout.flush() _logger.info("MSHBT:Creaated Heartbeat worker process") return @@ -215,9 +216,9 @@ def hb_worker_process(config_file_path): def db_monitoring_process(current_pid,jsfile): my_file = Path("./miss_htbt_service/db_monitoring.py") # if my_file.is_file(): - subprocess.call(["python3.6",ABSOLUTE_PATH2 , str(current_pid),jsfile]) + subprocess.call(["python3.8",ABSOLUTE_PATH2 , str(current_pid),jsfile]) # else: -# subprocess.call(["python3.6",ABSOLUTE_PATH2 , str(current_pid),jsfile]) +# subprocess.call(["python3.8",ABSOLUTE_PATH2 , str(current_pid),jsfile]) sys.stdout.flush() _logger.info("MSHBT:Creaated DB Monitoring process") return @@ -339,7 +340,7 @@ _logger = get_logger.get_logger(__name__) def main(): try: - p = subprocess.Popen(['python3.6',ABSOLUTE_PATH3],stdout=subprocess.PIPE,stderr=subprocess.STDOUT) + p = subprocess.Popen(['python3.8',ABSOLUTE_PATH3],stdout=subprocess.PIPE,stderr=subprocess.STDOUT) _logger.info("MSHBD:Execution Started") job_list = [] pid_current = os.getpid() |