Browse Source

Events: Workers were not recognized as alive, because max_heartbets removed new heartbeats instead of old

Ask Solem 14 years ago
parent
commit
eb6f52ca1b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/events/state.py

+ 1 - 1
celery/events/state.py

@@ -41,7 +41,7 @@ class Worker(Element):
         if timestamp:
             heapq.heappush(self.heartbeats, timestamp)
             if len(self.heartbeats) > self.heartbeat_max:
-                self.heartbeats = self.heartbeats[:self.heartbeat_max]
+                self.heartbeats = self.heartbeats[self.heartbeat_max:]
 
     def __repr__(self):
         return "<Worker: %s (%s)" % (self.hostname,