- changes for last day
This commit is contained in:
@@ -73,10 +73,13 @@ def load_file(url: str, output_path: str):
|
||||
|
||||
|
||||
def load_config_and_licenses(server: str):
|
||||
load_file(utils.join_host_and_path(server, '/deploy/pvqa.cfg'), PVQA_CFG_PATH)
|
||||
load_file(utils.join_host_and_path(server, '/deploy/pvqa.lic'), PVQA_LIC_PATH)
|
||||
load_file(utils.join_host_and_path(server, '/deploy/aqua-wb.lic'), AQUA_LIC_PATH)
|
||||
|
||||
# ToDo: validate licenses before. If they are ok - skip their update
|
||||
try:
|
||||
load_file(utils.join_host_and_path(server, '/deploy/pvqa.cfg'), PVQA_CFG_PATH)
|
||||
load_file(utils.join_host_and_path(server, '/deploy/pvqa.lic'), PVQA_LIC_PATH)
|
||||
load_file(utils.join_host_and_path(server, '/deploy/aqua-wb.lic'), AQUA_LIC_PATH)
|
||||
except Exception as e:
|
||||
utils.log_error(f'Failed to fetch new licenses and config. Skipping it.')
|
||||
|
||||
def find_binaries(bin_directory: Path, license_server: str = None):
|
||||
# Update path to pvqa/aqua-wb
|
||||
@@ -95,26 +98,26 @@ def find_binaries(bin_directory: Path, license_server: str = None):
|
||||
SILER_PATH = bin_directory / platform_prefix / SILER_PATH
|
||||
SPEECH_DETECTOR_PATH = bin_directory / platform_prefix / SPEECH_DETECTOR_PATH
|
||||
|
||||
print(f'Looking for binaries/licenses/configs at {bin_directory}...', end=' ')
|
||||
utils.log(f'Looking for binaries/licenses/configs at {bin_directory}...')
|
||||
|
||||
# Check if binaries exist
|
||||
if not PVQA_PATH.exists():
|
||||
print(f'Failed to find pvqa binary at {PVQA_PATH}. Exiting.')
|
||||
utils.log_error(f'Failed to find pvqa binary at {PVQA_PATH}. Exiting.')
|
||||
sys.exit(1)
|
||||
|
||||
if not PVQA_CFG_PATH.exists():
|
||||
PVQA_CFG_PATH = Path(utils.get_script_path()) / 'pvqa.cfg'
|
||||
|
||||
if not PVQA_CFG_PATH.exists():
|
||||
print(f'Failed to find pvqa config. Exiting.')
|
||||
utils.log_error(f'Failed to find pvqa config. Exiting.')
|
||||
sys.exit(1)
|
||||
|
||||
if not AQUA_PATH.exists():
|
||||
print(f'Failed to find aqua-wb binary. Exiting.')
|
||||
utils.log_error(f'Failed to find aqua-wb binary. Exiting.')
|
||||
sys.exit(1)
|
||||
|
||||
if not SILER_PATH.exists():
|
||||
print(f'Failed to find silence_eraser binary. Exiting.')
|
||||
utils.log_error(f'Failed to find silence_eraser binary. Exiting.')
|
||||
sys.exit(1)
|
||||
|
||||
if license_server is not None:
|
||||
@@ -125,16 +128,16 @@ def find_binaries(bin_directory: Path, license_server: str = None):
|
||||
if not PVQA_LIC_PATH.exists():
|
||||
PVQA_LIC_PATH = Path(utils.get_script_path()) / 'pvqa.lic'
|
||||
if not PVQA_LIC_PATH.exists():
|
||||
print(f'Failed to find pvqa license. Exiting.')
|
||||
utils.log_error(f'Failed to find pvqa license. Exiting.')
|
||||
sys.exit(1)
|
||||
|
||||
if not AQUA_LIC_PATH.exists():
|
||||
AQUA_LIC_PATH = Path(utils.get_script_path()) / 'aqua-wb.lic'
|
||||
if not AQUA_LIC_PATH.exists():
|
||||
print(f'Failed to find AQuA license. Exiting.')
|
||||
utils.log_error(f'Failed to find AQuA license. Exiting.')
|
||||
sys.exit(1)
|
||||
|
||||
print(f'Found all analyzers.')
|
||||
utils.log(f' Found all analyzers.')
|
||||
|
||||
|
||||
def speech_detector(test_path: str):
|
||||
|
||||
Reference in New Issue
Block a user