Skip to content

Commit

Permalink
Add protection against not all keys being present at start
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit committed May 8, 2024
1 parent 7b3fb16 commit baa726a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ commit = False
message = service version: {current_version} → {new_version}
tag = False

[bumpversion:file:.osparc/osparc-map/metadata.yml]
[bumpversion:file:.osparc/osparc-meta-parallelrunner/metadata.yml]
search = {current_version}
replace = {new_version}

Expand Down
6 changes: 5 additions & 1 deletion docker_scripts/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ def start(self):
while (
INPUT_PARAMETERS_KEY not in key_values
or key_values[INPUT_PARAMETERS_KEY]["value"] is None
or TEMPLATE_ID_KEY not in key_values
or key_values[TEMPLATE_ID_KEY]["value"] is None
or N_OF_WORKERS_KEY not in key_values
or key_values[N_OF_WORKERS_KEY]["value"] is None
):
if waiter % 10 == 0:
logger.info(
f"Waiting for {INPUT_PARAMETERS_KEY} "
"Waiting for all required keys to "
"to exist in key_values..."
)
key_values = json.loads(self.key_values_path.read_text())
Expand Down

0 comments on commit baa726a

Please sign in to comment.