소스 검색

and include abs with that for negative values...

Ask Solem 12 년 전
부모
커밋
8dc0b9f54b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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