Skip to content

Commit

Permalink
str fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Aug 15, 2024
1 parent b370ec5 commit c5bcb7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pioreactor/actions/leader/experiment_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def _callable() -> None:
if (get_assigned_experiment_name(unit) != experiment) and not is_testing_env():
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down Expand Up @@ -415,6 +416,7 @@ def _callable() -> None:
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if ((if_ is None) or evaluate_bool_expression(if_, env)) and (
Expand Down Expand Up @@ -496,6 +498,7 @@ def _callable() -> None:
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down Expand Up @@ -524,6 +527,8 @@ def _callable() -> None:
# first check if the Pioreactor is still part of the experiment.
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down Expand Up @@ -561,6 +566,7 @@ def _callable() -> None:
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down Expand Up @@ -590,6 +596,7 @@ def _callable() -> None:
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down Expand Up @@ -619,6 +626,7 @@ def _callable() -> None:
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down Expand Up @@ -649,6 +657,7 @@ def _callable() -> None:
if get_assigned_experiment_name(unit) != experiment:
return

nonlocal env
env = env | {"hours_elapsed": seconds_to_hours(elapsed_seconds_func())}

if (if_ is None) or evaluate_bool_expression(if_, env):
Expand Down

0 comments on commit c5bcb7f

Please sign in to comment.