Skip to content

Commit

Permalink
adding fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed May 13, 2024
1 parent a01eb30 commit 9876b03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pioreactor/background_jobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ def __init__(self, *args, source="app", **kwargs) -> None:
super().__init__(*args, source=source, **kwargs) # type: ignore

self.add_to_published_settings("enable_dodging_od", {"datatype": "boolean", "settable": True})
self.set_enable_dodging_od(self.get_from_config("enable_dodging_od", cast=bool))
self.set_enable_dodging_od(self.get_from_config("enable_dodging_od", cast=bool, fallback="True"))

def get_from_config(self, key: str, cast=None, **get_kwargs):
section = f"{self.job_name}.config"
Expand Down
3 changes: 2 additions & 1 deletion pioreactor/tests/test_background_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ def action_to_do_after_od_reading(self):
assert len(bucket) > 4, bucket

st.clean_up()
ODReader._post_read.clear()
ODReader._post_read = []
ODReader._pre_read = []


def test_dodging_when_od_reading_stops_first() -> None:
Expand Down

0 comments on commit 9876b03

Please sign in to comment.