DAQ: added new properties to redis including crystal size, b_factor and automation_parameters
This commit is contained in:
1 parent
22d21dcb6d
commit
b40b30c13d
2 files changed
+18
-1
No files matched your search
@@ -112,6 +112,24 @@ class BeamlineConfig:
|
||||
)
|
||||
self.__client.expire(f"{self.__bl}:active_session", expiry_sec)
|
||||
|
||||
#TODO finish setting this up!
|
||||
def try_extend_active_session(self, session: int, expiry_sec: int) -> None:
|
||||
with redis_lock.Lock(
|
||||
self.__client, f"{self.__bl}:active_session_lock", expire=10
|
||||
):
|
||||
tmp = self.__client.get(f"{self.__bl}:active_session")
|
||||
if tmp == session:
|
||||
self.__client.expire(f"{self.__bl}:active_session", expiry_sec, gt=True)
|
||||
elif int(tmp) != session:
|
||||
raise Exception(
|
||||
"There is already active session with different id. Try again later."
|
||||
)
|
||||
else:
|
||||
raise Exception(
|
||||
"There is no active session with given id. Try again later."
|
||||
)
|
||||
|
||||
|
||||
def end_active_session(self, session: int) -> None:
|
||||
with redis_lock.Lock(
|
||||
self.__client, f"{self.__bl}:active_session_lock", expire=10
|
||||
|
||||
@@ -135,7 +135,6 @@ class JFJochWrapper:
|
||||
ring_current_mA=s.bl.ring_current_mA,
|
||||
sample_temperature_K=s.bl.cryojet_K,
|
||||
total_flux=s.bl.flux_ph_s,
|
||||
space_group_number=1,#TODO space_group_number and unit_cell???
|
||||
poni_rot1_rad = s.diffraction.poni_rot1_rad,
|
||||
poni_rot2_rad = s.diffraction.poni_rot2_rad,
|
||||
max_spot_count = 1000,
|
||||
|
||||
Reference in new issue
Block a user