How do I run parallel tasks with Celery?
<p>I am using Celery to run some tasks that take a long time to complete. There 
is an initial task that needs to complete before two sub-tasks can run. The tasks that I created are file system operations and don't return a result. </p>

<p>I would like the subtasks to run at the same time, but when I use a group for these tasks they run sequentially and not in parallel.</p>

<p>I have tried: </p>

<pre><code>g = group([secondary_task(), secondary_tasks2()])
chain(initial_task(),g)
</code></pre>

<p>I've also tried running the group directly in the first task, but that doesn't seem to work either. </p>

<p>Is what I'm trying to accomplish doable with Celery?  </p>

<pre><code>    First Task
/                \
Second Task      Third Task
</code></pre>

<p>Not:</p>

<pre><code>First Task
     |
Second Task
     | 
Third Task
</code></pre>

<p>The chain is definitely the right approach. </p>

<p>I would expect this to work: chain(initial_task.s(), g)()</p>

<p>Do you have more than one celery worker running to be able to run more than one task at the same time?</p>

python celery