I have error when i am trying to use chord to send a task after all the tasks have been sent.
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/wenzhixue/projects/workspace/fallfor_core/twitter/tasks.py", line 13, in bulk_change_bio
chord([change_bio_task.delay(account,'http://fallfor.com') for account in account_list ])(shutdown.s(c))
File "/Library/Python/2.7/site-packages/celery/canvas.py", line 470, in __call__
_chord = self.type
File "/Library/Python/2.7/site-packages/celery/canvas.py", line 467, in type
return self._type or self.tasks[0].type.app.tasks['celery.chord']
AttributeError: 'AsyncResult' object has no attribute 'type'
-
@task()
def shutdown(ec2):
print "shutting down!!!!"
time.sleep(300)
return True
c = Ec2()
account_list = Account.objects.all()
chord([change_bio_task.delay() for account in account_list ])(shutdown.s(c))