File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments