Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Feb 4, 2025
1 parent 40eaa56 commit ed14127
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- fixed ui not showing 3p calibrations
- experiment profiles start now use the unit_api directly. This may mitigate the issue where huey workers stampeding on each other when try to start many jobs.
- fix `pio calibrations run ... -y` not saving as active.
- fix manual dosing in the UI

### 25.1.21

Expand Down
4 changes: 2 additions & 2 deletions pioreactor/actions/pump.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def get_default_calibration() -> structs.SimplePeristalticPumpCalibration:
hz=250.0,
dc=95.0,
voltage=-1,
calibration_name="default_pump_calibration",
calibration_name="__default_pump_calibration",
curve_type="poly",
curve_data_=[0.0911, 0.0], # 0.0911 is a pretty okay estimate for the slope
recorded_data={"x": [], "y": []},
)


def is_default_calibration(cal: structs.SimplePeristalticPumpCalibration):
return cal.calibration_name == "default_pump_calibration"
return cal.calibration_name == "__default_pump_calibration"


# Initialize the thread pool with a worker threads.
Expand Down
2 changes: 1 addition & 1 deletion pioreactor/background_jobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def on_disconnect(client, userdata, flags, reason_code, properties) -> None:
client = create_client(
client_id=f"{self.job_name}-sub-{self.unit}-{self.experiment}",
last_will=last_will,
keepalive=120,
keepalive=125,
clean_session=False, # this, in theory, will reconnect to old subs when we reconnect.
)
# we catch exceptions and report them in our software
Expand Down
4 changes: 3 additions & 1 deletion pioreactor/background_jobs/dosing_automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ class DosingAutomationJob(AutomationJob):

automation_name = "dosing_automation_base" # is overwritten in subclasses
job_name = "dosing_automation"
published_settings: dict[str, pt.PublishableSetting] = {}
published_settings: dict[
str, pt.PublishableSetting
] = {} # see methods in init for dynamic additions, like liquid_volume

previous_normalized_od: Optional[float] = None
previous_growth_rate: Optional[float] = None
Expand Down
3 changes: 3 additions & 0 deletions update_scripts/upcoming/update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

CREATE INDEX IF NOT EXISTS stirring_rates_ix
ON stirring_rates (experiment, pioreactor_unit);

CREATE INDEX IF NOT EXISTS pwm_dcs_ix
ON pwm_dcs (experiment, pioreactor_unit);

0 comments on commit ed14127

Please sign in to comment.