MCPcopy
hub / github.com/celery/celery / joinall

Function joinall

examples/resultgraph/tasks.py:57–73  ·  view source on GitHub ↗
(R, timeout=None, propagate=True)

Source from the content-addressed store, hash-verified

55
56
57def joinall(R, timeout=None, propagate=True):
58 stack = deque([R])
59
60 try:
61 use_native = joinall.backend.supports_native_join
62 except AttributeError:
63 use_native = False
64
65 while stack:
66 res = stack.popleft()
67 if isinstance(res, ResultSet):
68 j = res.join_native if use_native else res.join
69 stack.extend(j(timeout=timeout, propagate=propagate))
70 elif isinstance(res, AsyncResult):
71 stack.append(res.get(timeout=timeout, propagate=propagate))
72 else:
73 yield res
74
75
76@task()

Callers 1

unlock_graphFunction · 0.85

Calls 2

extendMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected