Skip to content

Commit

Permalink
update these paths too
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Dec 29, 2024
1 parent 09cb949 commit 229d789
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pioreactorui/unit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from pioreactor.calibrations import CALIBRATION_PATH
from pioreactor.config import get_leader_hostname
from pioreactor.utils import local_intermittent_storage
from pioreactor.utils import local_persistant_storage
from pioreactor.utils import local_persistent_storage
from pioreactor.utils.timing import current_utc_timestamp
from pioreactor.utils.timing import to_datetime

Expand Down Expand Up @@ -501,7 +501,7 @@ def get_all_calibrations() -> ResponseReturnValue:

all_calibrations: dict[str, list] = {}

with local_persistant_storage("active_calibrations") as cache:
with local_persistent_storage("active_calibrations") as cache:
for file in calibration_dir.glob("*/*.yaml"):
try:
cal = yaml_decode(file.read_bytes())
Expand All @@ -526,7 +526,7 @@ def get_calibrations(cal_type) -> ResponseReturnValue:

calibrations: list[dict] = []

with local_persistant_storage("active_calibrations") as c:
with local_persistent_storage("active_calibrations") as c:
for file in calibration_dir.glob("*.yaml"):
try:
cal = yaml_decode(file.read_bytes())
Expand All @@ -540,15 +540,15 @@ def get_calibrations(cal_type) -> ResponseReturnValue:

@unit_api.route("/calibrations/<cal_type>/<cal_name>/active", methods=["PATCH"])
def set_active_calibration(cal_type, cal_name) -> ResponseReturnValue:
with local_persistant_storage("active_calibrations") as c:
with local_persistent_storage("active_calibrations") as c:
c[cal_type] = cal_name

return Response(status=200)


@unit_api.route("/calibrations/<cal_type>/active", methods=["DELETE"])
def remove_active_status_calibration(cal_type) -> ResponseReturnValue:
with local_persistant_storage("active_calibrations") as c:
with local_persistent_storage("active_calibrations") as c:
c.pop(cal_type)

return Response(status=200)
Expand Down

0 comments on commit 229d789

Please sign in to comment.