Permalink
Browse files

Add listener ready check to process heartbeat

  • Loading branch information...
1 parent 841776a commit b2ed2e15a9fa880e20522f130ebdaed1f78d8c3c @daf daf committed Mar 28, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 pyon/ion/process.py
View
@@ -86,15 +86,15 @@ def heartbeat(self):
Should only be called after the process has been started.
Checks the following:
- - All attached endpoints are alive + listening
+ - All attached endpoints are alive + listening (this means ready)
- The control flow greenlet is alive + listening or processing
@return 3-tuple indicating (listeners ok, ctrl thread ok, heartbeat status). Use all on it for a
boolean indication of success.
"""
listeners_ok = True
for l in self.listeners:
- if not (l in self._listener_map and not self._listener_map[l].proc.dead):
+ if not (l in self._listener_map and not self._listener_map[l].proc.dead and l.get_ready_event().is_set()):
listeners_ok = False
ctrl_thread_ok = self._ctrl_thread.running

0 comments on commit b2ed2e1

Please sign in to comment.