fix(x_ray_eye): added 20s rpc timeout to most rpc calls
This commit is contained in:
@@ -38,12 +38,14 @@ class XRayEye(RPCBase):
|
||||
None
|
||||
"""
|
||||
|
||||
@rpc_timeout(20)
|
||||
@rpc_call
|
||||
def on_live_view_enabled(self, enabled: "bool"):
|
||||
"""
|
||||
None
|
||||
"""
|
||||
|
||||
@rpc_timeout(20)
|
||||
@rpc_call
|
||||
def on_motors_enable(self, x_enable: "bool", y_enable: "bool"):
|
||||
"""
|
||||
@@ -54,6 +56,7 @@ class XRayEye(RPCBase):
|
||||
y_enable(bool): enable y motor controls
|
||||
"""
|
||||
|
||||
@rpc_timeout(20)
|
||||
@rpc_call
|
||||
def enable_submit_button(self, enable: "bool"):
|
||||
"""
|
||||
@@ -90,12 +93,14 @@ class XRayEye(RPCBase):
|
||||
None
|
||||
"""
|
||||
|
||||
@rpc_timeout(20)
|
||||
@rpc_call
|
||||
def switch_tab(self, tab: "str"):
|
||||
"""
|
||||
None
|
||||
"""
|
||||
|
||||
@rpc_timeout(20)
|
||||
@rpc_call
|
||||
def submit_fit_array(self, fit_array):
|
||||
"""
|
||||
|
||||
@@ -4,6 +4,7 @@ from bec_lib import bec_logger
|
||||
from bec_lib.endpoints import MessageEndpoints
|
||||
from bec_qthemes import material_icon
|
||||
from bec_widgets import BECWidget, SafeProperty, SafeSlot
|
||||
from bec_widgets.utils.rpc_decorator import rpc_timeout
|
||||
from bec_widgets.widgets.plots.image.image import Image
|
||||
from bec_widgets.widgets.plots.waveform.waveform import Waveform
|
||||
from bec_widgets.widgets.plots.image.setting_widgets.image_roi_tree import ROIPropertyTree
|
||||
@@ -366,6 +367,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
return self.message_line_edit.text()
|
||||
|
||||
@user_message.setter
|
||||
@rpc_timeout(20)
|
||||
def user_message(self, message: str):
|
||||
self.message_line_edit.setText(message)
|
||||
|
||||
@@ -374,6 +376,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
return self.sample_name_line_edit.text()
|
||||
|
||||
@sample_name.setter
|
||||
@rpc_timeout(20)
|
||||
def sample_name(self, message: str):
|
||||
self.sample_name_line_edit.setText(message)
|
||||
|
||||
@@ -394,6 +397,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
################################################################################
|
||||
|
||||
@SafeSlot(str)
|
||||
@rpc_timeout(20)
|
||||
def switch_tab(self, tab: str):
|
||||
if tab == "fit":
|
||||
self.tab_widget.setCurrentIndex(1)
|
||||
@@ -411,6 +415,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
return roi.get_coordinates()
|
||||
|
||||
@SafeSlot(bool)
|
||||
@rpc_timeout(20)
|
||||
def on_live_view_enabled(self, enabled: bool):
|
||||
logger.info(f"Live view is enabled: {enabled}")
|
||||
self.live_preview_toggle.blockSignals(True)
|
||||
@@ -459,6 +464,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
self.shutter_toggle.blockSignals(False)
|
||||
|
||||
@SafeSlot(bool, bool)
|
||||
@rpc_timeout(20)
|
||||
def on_motors_enable(self, x_enable: bool, y_enable: bool):
|
||||
"""
|
||||
Enable/Disable motor controls
|
||||
@@ -471,6 +477,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
self.motor_control_2d.enable_controls_ver(y_enable)
|
||||
|
||||
@SafeSlot(bool)
|
||||
@rpc_timeout(20)
|
||||
def enable_submit_button(self, enable: bool):
|
||||
"""
|
||||
Enable/disable submit button.
|
||||
@@ -508,6 +515,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
print(f"meta: {meta}")
|
||||
|
||||
@SafeSlot()
|
||||
@rpc_timeout(20)
|
||||
def submit_fit_array(self, fit_array):
|
||||
self.tab_widget.setCurrentIndex(1)
|
||||
# self.fix_x.title = " got fit array"
|
||||
|
||||
Reference in New Issue
Block a user