소스 검색

Another syntax error in AMQP backend fix.

Ask Solem 15 년 전
부모
커밋
5031102a89
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      celery/backends/amqp.py

+ 1 - 2
celery/backends/amqp.py

@@ -116,8 +116,7 @@ class AMQPBackend(BaseDictBackend):
         return self.poll(task_id)
 
     def wait_for(self, task_id, timeout=None, cache=True):
-        if task_id in self._cache:
-            cached_meta = self._cache[task_id]
+        cached_meta = self._cache.get(task_id)
 
         if cached_meta and cached_meta["status"] in states.READY_STATES:
             meta = cached_meta