Skip to content

Commit

Permalink
Read wlm config from local json
Browse files Browse the repository at this point in the history
  • Loading branch information
cibinmathew committed Jul 16, 2023
1 parent 7d2361b commit d853493
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/WorkloadManagementScheduler/wlm_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def get_wlm_config(ruleset, region_name):
elif CONFIG_KEY in ruleset and isinstance(ruleset[CONFIG_KEY], basestring):
if ruleset[CONFIG_KEY].startswith('s3://'):
wlm_config = json.dumps(get_file_contents(ruleset[CONFIG_KEY], region_name))
else: # use json file in the lambda code dir
with open(ruleset[CONFIG_KEY]) as config_file:
wlm_config = config_file.read()
else:
raise Exception(
"Malformed Configuration for Ruleset %s. '%s' must be a json based WLM configuration or an S3 file location" % (
Expand Down

0 comments on commit d853493

Please sign in to comment.