Skip to content

Commit d853493

Browse files
committed
Read wlm config from local json
1 parent 7d2361b commit d853493

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 json file in the lambda code dir
104+
with open(ruleset[CONFIG_KEY]) as config_file:
105+
wlm_config = config_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)