My question is similar to How to chain a Celery task that returns a list into a group?, which basically asks how do we do:
process_list = (get_list.s(10) | group(process_item.s(i) for i in ???))
and the answer was to fake the group with a task. Now, an issue arises if want to extend the chain beyond the last group:
process_list = (get_list.s(10) | dmap.s((process_item.s(i) for i in ???) | do_something.s())
Then dmap
returns GroupResults
which cannot be processed by do_something
. Any ideas?
PS: The dmap
solution will work only with the pickle
encoder and not with the new standard json
encoder.