I am looking for some advice as to the best way to map a list generated from a task to another task in celery.
Let\'s say I have a task called parse
, wh
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)