inspect jfjoch status after wait_til_running
This commit is contained in:
@@ -277,10 +277,20 @@ class JFJochWrapper:
|
||||
|
||||
@needs_init
|
||||
def wait_till_running(self, timeout: float = 60):
|
||||
logger.info("Waiting for JFJoch to report detector armed")
|
||||
if self._simulated:
|
||||
return None
|
||||
try:
|
||||
self._api.wait_until_running_post_with_http_info(timeout=math.ceil(timeout))
|
||||
status = self._api.status_get()
|
||||
logger.debug(status)
|
||||
if status.message_severity == "error":
|
||||
raise self._jfjoch_error(
|
||||
f"JFJoch status message has error severity after waiting for arm: {status.message}",
|
||||
error=RuntimeError(status.message),
|
||||
operation="POST",
|
||||
endpoint="wait_until_running_post",
|
||||
)
|
||||
return True
|
||||
except Exception as e:
|
||||
raise self._jfjoch_error(
|
||||
|
||||
Reference in New Issue
Block a user