no warning 'does not match target' while restarting

This commit is contained in:
2024-06-17 15:18:40 +02:00
parent 173ef914d7
commit 0869f8b5d9

View File

@ -166,7 +166,7 @@ class FrappyConfig(Device):
while not self._shutdown_event.wait(1):
busy = session.daemon_device._controller.status >= 0
if self._restarting or (busy and cnt < 10):
# do not check when restarting and check only every 10 sec when busy
# do not check while restarting and check only every 10 sec when busy
cnt += 1
continue
if not busy and self._back_to_normal:
@ -739,7 +739,8 @@ class FrappyNode(SecNodeDevice, Moveable):
if self._cfgvalue is None:
running_cfg = FrappyManager().get_cfg(config.instrument, self.service)
if running_cfg:
if running_cfg != self.target:
fc = session.devices.get('frappy')
if running_cfg != self.target and fc and not fc._restarting:
self.log.warning(f'server info {running_cfg!r} does not match target cfg {self.target!r}')
self._cfgvalue = running_cfg
else: