Jelajahi Sumber

get_many should support CELERY_TRACK_STARTED. Closes #2326

Ask Solem 10 tahun lalu
induk
melakukan
d6c0407a7b
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      celery/backends/base.py

+ 2 - 1
celery/backends/base.py

@@ -469,7 +469,8 @@ class KeyValueStoreBackend(BaseBackend):
             cache.update(r)
             cache.update(r)
             ids.difference_update(set(bytes_to_str(v) for v in r))
             ids.difference_update(set(bytes_to_str(v) for v in r))
             for key, value in items(r):
             for key, value in items(r):
-                yield bytes_to_str(key), value
+                if value['status'] in READY_STATES:
+                    yield bytes_to_str(key), value
             if timeout and iterations * interval >= timeout:
             if timeout and iterations * interval >= timeout:
                 raise TimeoutError('Operation timed out ({0})'.format(timeout))
                 raise TimeoutError('Operation timed out ({0})'.format(timeout))
             time.sleep(interval)  # don't busy loop.
             time.sleep(interval)  # don't busy loop.