소스 검색

Fixed small issue with last commit

Ask Solem 11 년 전
부모
커밋
7822b2ff9f
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      celery/events/state.py

+ 1 - 3
celery/events/state.py

@@ -184,9 +184,7 @@ class Worker(object):
 
     @property
     def alive(self, nowfun=time):
-        now = nowfun()
-        expires = self.heartbeat_expires
-        return bool(self.heartbeats and now < expires)
+        return bool(self.heartbeats and nowfun() < self.heartbeat_expires)
 
     @property
     def id(self):