Explorar o código

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

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
eb6f52ca1b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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,