CONFIG: forgot to commit changes to config redis handling!
Build and Publish / test (push) Successful in 1m36s
Build and Publish / build (push) Successful in 16s
Build and Publish / Build and Deploy Docs (push) Successful in 38s

This commit is contained in:
2026-06-09 14:26:06 +02:00
parent bd8f66009c
commit b8041c52a4
+16 -7
View File
@@ -894,18 +894,27 @@ class BeamlineConfig:
else:
self.__client.set(f"{self.__bl}:last_best_b_factor", last_best_b_factor)
def get_mount_fail_count(self) -> int:
value = self.__client.get(f"{self.__bl}:mount_fail_count")
def _mount_failure_streak_key(self) -> str:
return f"{self.__bl}:mount_fail_count"
def get_mount_failure_streak(self) -> int:
value = self.__client.get(self._mount_failure_streak_key())
return int(value) if value else 0
def increment_mount_failure_streak(self) -> int:
return int(self.__client.incr(self._mount_failure_streak_key()))
def reset_mount_failure_streak(self) -> None:
self.__client.delete(self._mount_failure_streak_key())
def get_mount_fail_count(self) -> int:
return self.get_mount_failure_streak()
def record_mount_failure(self) -> int:
# Atomic increment
return self.__client.incr(f"{self.__bl}:mount_fail_count")
return self.increment_mount_failure_streak()
def record_mount_success(self):
# Atomic delete/reset
self.__client.delete(f"{self.__bl}:mount_fail_count")
self.reset_mount_failure_streak()
@property
def simple_input_parameters(self) -> SimpleStrategyInputModel | None:
tmp = self.__client.get(f"{self.__bl}:simple_input_params")