Skip to content

Commit eb4c004

Browse files
committed
More logs on dormancy check
1 parent fb0f4e3 commit eb4c004

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/murfey/client/multigrid_control.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,17 @@ def is_ready_for_dormancy(self):
137137
for w in self._environment.watchers.values():
138138
if w.is_safe_to_stop():
139139
w.stop()
140-
return (
141-
all(r._finalised for r in self.rsync_processes.values())
142-
and not any(a.thread.is_alive() for a in self.analysers.values())
143-
and not any(
144-
w.thread.is_alive() for w in self._environment.watchers.values()
145-
)
140+
rsyncers_finalised = all(
141+
r._finalised for r in self.rsync_processes.values()
142+
)
143+
analysers_alive = any(a.thread.is_alive() for a in self.analysers.values())
144+
watchers_alive = any(
145+
w.thread.is_alive() for w in self._environment.watchers.values()
146+
)
147+
log.debug(
148+
f"Dormancy check: rsyncers {rsyncers_finalised}, analysers {not analysers_alive}, watchers {not watchers_alive}"
146149
)
150+
return rsyncers_finalised and not analysers_alive and not watchers_alive
147151
log.debug(f"Multigrid watcher for session {self.session_id} is still active")
148152
return False
149153

0 commit comments

Comments
 (0)