Best way to map a generated list to a task in celery

风流意气都作罢 提交于 2019-11-30 15:12:17

This is probably far too late to be of use to you, but you probably want to use a task chain:

@celery.task
def process():
    return chain(parse.s(), feed_map.s())

@celery.task
def feed_map(pages):
    return feed.map(pages)

if you have some final task, say final, you could do this:

@celery.task
def feed_map(pages):
    return chord(feed.map.s(page) for page in pages, final.s)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!