python - Celery chain results from task to map to another -


i have celery application

@task def step_one(items):     items.sort()     in range(len(items), 100):         yield items[i:i + 100]  @task def step_two(batch):     item in batch:         print(item)  if __name__ == '__main__':     celery.chain(step_one.s([i in range 100000]), step_two.map().s()).delay() 

this not work because step_two expecting iterator, want take results previous step, correct way go this? nice if tasks start @ yield rather after whole list sorted , chunked.

i have seen question best way map generated list task in celery feel should not necessary create intermediate step map results task. additionally, calling step_two.map.s() gives me error function object has no attribute s


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -