map()的参数2必须支持使用celery时的迭代

时间:2013-01-07 21:10:20

标签: python django celery

我将这个任务称为这样一个组:

celery.group(getting_a_page.s(user, i,post) for i in range(no_of_pages))().get()

这是我的任务:

@task(ignore_result=True)
    def getting_a_page(user,page_no,post):

        print "getting a posterous page"

        return True

我哪里错了?这个错误意味着什么?

编辑:

错误讯息:

/home/migrate/migrate/../migrate/apps/migrateuser/views.py" in start_migration
  72.   getting_a_page(user)
File "/home/migrate/migrate/apps/posting_app/posting.py" in posterours_get_pages_task
  21.   celery.group(getting_a_page.s(user, i,post) for i in range(no_of_pages))().get()
File "/usr/local/lib/python2.7/dist-packages/celery/canvas.py" in __call__
  316.                     map(Signature.clone, self.tasks), partial_args)

0 个答案:

没有答案