I am working on a small but computationally-intensive Python app. The computationally-intensive work can be broken into several pieces that can be executed concurrently. I a
Use the Group feature of celery canvas:
The group primitive is a signature that takes a list of tasks that should be applied in parallel.
Here is the example provided in the documentation:
from celery import group
from proj.tasks import add
g = group(add.s(2, 2), add.s(4, 4))
res = g()
res.get()
Which outputs [4, 8]
.