Skip to content

Commit 347d1c3

Browse files
authored
Read wlm config from local json
1 parent 7d2361b commit 347d1c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/WorkloadManagementScheduler/wlm_scheduler.py

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ def get_wlm_config(ruleset, region_name):
100100
elif CONFIG_KEY in ruleset and isinstance(ruleset[CONFIG_KEY], basestring):
101101
if ruleset[CONFIG_KEY].startswith('s3://'):
102102
wlm_config = json.dumps(get_file_contents(ruleset[CONFIG_KEY], region_name))
103+
else: # use a local json file
104+
with open(ruleset[CONFIG_KEY]) as user_file:
105+
wlm_config = user_file.read()
103106
else:
104107
raise Exception(
105108
"Malformed Configuration for Ruleset %s. '%s' must be a json based WLM configuration or an S3 file location" % (

0 commit comments

Comments
 (0)