title: How to create a chord in celery whose tasks are chord themselves
body: <p>I am trying to create a chord in celery whose tasks in a group are chord themselves. So the idea being - each of the individual subchords execute first and then the results of these chords are then finally used by the callback of the parent task. Here is the code that I am trying to do </p>
  
  <p>-- tasks.py </p>
  
  <pre><code>import celery
  from celery import chord
  
  @celery.task
  def add(x, y):
      print "add called..."
      return x + y
  
  @celery.task
  def tsum(numbers):
      return sum(numbers)
  
  @celery.task
  def gr_add(x):
      print "**** gr_add called"
      c = chord(add.subtask((i,i)) for i in range(2*x, 2*x+2))
      r = c(tsum.subtask())
      return r.get(timeout=120)
  </code></pre>
  
  <p>-- and then my test-chord-chord.py file contains </p>
  
  <pre><code>from tasks import add, tsum, gr_add
  from celery import chord
  
  c = chord(gr_add.subtask((i,)) for i in range(2))
  result = c(tsum.subtask())
  print result.get(timeout=5)
  </code></pre>
  
  <p>However, this is not executing as expected. Am I doing it correctly? Is there another way of achieving the above?  </p>