From 533e2c306c3fe40593b00c5cd6f2103759c9725c Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Mon, 20 Jan 2025 13:59:20 -0500 Subject: [PATCH] need to restart mqtt and monitor since the location of the db moved; --- CHANGELOG.md | 3 ++- pioreactor/calibrations/__init__.py | 6 +++--- update_scripts/upcoming/pre_update.sh | 1 + update_scripts/upcoming/update.sh | 5 +++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 995d12a4..5a6be21f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ - DELETE `/api/workers//calibrations//` - DELETE `/unit_api/active_calibrations//` - DELETE `/unit_api/calibrations//` + - POST `/unit_api/calibrations/` - New API for plugins - GET `/api/units//plugins/installed` - PATCH `/api/units//plugins/install` @@ -83,7 +84,7 @@ - fixed typo `utils.local_persistant_storage` to `utils.local_persistent_storage`. - Kalman Filter database table is no longer populated. There is a way to re-add it, lmk. - moved intermittent cache location to `/tmp/pioreactor_cache/local_intermittent_pioreactor_metadata.sqlite`. This also determined by your configuration, see `[storage]`. -- removed `pioreactor.utils.gpio_helpers` + - removed `pioreactor.utils.gpio_helpers` - removed `calibrations` export dataset. Use the export option on the /Calibrations page instead. - persistent storage is now on single sqlite3 database in `/home/pioreactor/.pioreactor/storage/local_persistent_pioreactor_metadata.sqlite`. This is configurable in your configuration. - When checking for calibrations in custom Dosing automations, users may have added: diff --git a/pioreactor/calibrations/__init__.py b/pioreactor/calibrations/__init__.py index 520dbc7f..246b6a42 100644 --- a/pioreactor/calibrations/__init__.py +++ b/pioreactor/calibrations/__init__.py @@ -47,7 +47,7 @@ class SingleVialODProtocol(CalibrationProtocol): target_device = "od" protocol_name = "single_vial" - def run(self, *args) -> structs.ODCalibration: + def run(self, *args, **kwargs) -> structs.ODCalibration: from pioreactor.calibrations.od_calibration import run_od_calibration return run_od_calibration() @@ -57,7 +57,7 @@ class BatchVialODProtocol(CalibrationProtocol): target_device = "od" protocol_name = "batch_vial" - def run(self, *args) -> structs.ODCalibration: + def run(self, *args, **kwargs) -> structs.ODCalibration: raise NotImplementedError("Not implemented yet") @@ -65,7 +65,7 @@ class DurationBasedPumpProtocol(CalibrationProtocol): target_device = ["media_pump", "alt_media_pump", "waste_pump"] protocol_name = "duration_based" - def run(self, target_device: str) -> structs.SimplePeristalticPumpCalibration: + def run(self, target_device: str, **kwargs) -> structs.SimplePeristalticPumpCalibration: from pioreactor.calibrations.pump_calibration import run_pump_calibration return run_pump_calibration(target_device) diff --git a/update_scripts/upcoming/pre_update.sh b/update_scripts/upcoming/pre_update.sh index cd7efc12..740517a8 100644 --- a/update_scripts/upcoming/pre_update.sh +++ b/update_scripts/upcoming/pre_update.sh @@ -35,4 +35,5 @@ if [ "$HOSTNAME" = "$LEADER_HOSTNAME" ]; then sudo -u pioreactor pios sync-configs --shared || : + fi diff --git a/update_scripts/upcoming/update.sh b/update_scripts/upcoming/update.sh index 0511f065..d39f9a19 100644 --- a/update_scripts/upcoming/update.sh +++ b/update_scripts/upcoming/update.sh @@ -53,4 +53,9 @@ if [ "$HOSTNAME" = "$LEADER_HOSTNAME" ]; then # 8. add yaml mimetype echo "application/yaml yaml yml" | sudo tee -a /etc/mime.types + # 9. restart monitor and mqtt + sudo systemctl daemon-reload + sudo systemctl restart pioreactor_startup_run@monitor + sudo systemctl restart pioreactor_startup_run@mqtt_to_db_streaming + fi