Browse Source

and include abs with that for negative values...

Ask Solem 11 years ago
parent
commit
8dc0b9f54b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/events/state.py

+ 1 - 1
celery/events/state.py

@@ -147,7 +147,7 @@ class Worker(AttributeDict):
     def update_heartbeat(self, received, timestamp):
         if not received or not timestamp:
             return
-        drift = int(received) - int(timestamp)
+        drift = abs(int(received) - int(timestamp))
         if drift > HEARTBEAT_DRIFT_MAX:
             warn(DRIFT_WARNING, self.hostname, drift)
         heartbeats, hbmax = self.heartbeats, self.heartbeat_max