Skip to content

Commit

Permalink
Add --ktools-legacy-gul-stream option to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed May 13, 2020
1 parent a9eec9d commit 50e6d82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ LOG_BACKUP_COUNT = 5
LOG_DIRECTORY = '/var/log/oasis'
KTOOLS_ERROR_GUARD = True
KTOOLS_NUM_PROCESSES = -1
KTOOLS_ALLOC_RULE_GUL = 1
KTOOLS_ALLOC_RULE_GUL = 0
KTOOLS_ALLOC_RULE_IL = 2
KTOOLS_ALLOC_RULE_RI = 3
KTOOLS_LEGACY_GUL_STREAM = False
IS_WINDOWS_HOST = False
LOCK_FILE = /tmp/tmp_lock_file
LOCK_TIMEOUT_IN_SECS = 180
Expand Down
4 changes: 4 additions & 0 deletions src/model_execution_worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
logging.info("MODEL_SETTINGS_FILE: {}".format(settings.get('worker', 'MODEL_SETTINGS_FILE', fallback=None)))
logging.info("OASISLMF_CONFIG: {}".format( settings.get('worker', 'oasislmf_config', fallback=None)))
logging.info("KTOOLS_NUM_PROCESSES: {}".format(settings.get('worker', 'KTOOLS_NUM_PROCESSES', fallback=None)))
logging.info("KTOOLS_LEGACY_GUL_STREAM: {}".format(settings.get('worker', 'KTOOLS_LEGACY_GUL_STREAM', fallback=False)))
logging.info("KTOOLS_ALLOC_RULE_GUL: {}".format(settings.get('worker', 'KTOOLS_ALLOC_RULE_GUL', fallback=None)))
logging.info("KTOOLS_ALLOC_RULE_IL: {}".format(settings.get('worker', 'KTOOLS_ALLOC_RULE_IL', fallback=None)))
logging.info("KTOOLS_ALLOC_RULE_RI: {}".format(settings.get('worker', 'KTOOLS_ALLOC_RULE_RI', fallback=None)))
Expand Down Expand Up @@ -301,6 +302,9 @@ def start_analysis(analysis_settings, input_location, complex_data_files=None):
if not settings.getboolean('worker', 'KTOOLS_ERROR_GUARD', fallback=True):
run_args.append('--ktools-disable-guard')

if settings.getboolean('worker', 'KTOOLS_LEGACY_GUL_STREAM', fallback=False):
run_args.append('--ktools-legacy-gul-stream')

if settings.getboolean('worker', 'DEBUG_MODE', fallback=False):
run_args.append('--verbose')
logging.info('run_directory: {}'.format(oasis_files_dir))
Expand Down

0 comments on commit 50e6d82

Please sign in to comment.