Combining chains, groups and chunks with Celery
问题 I want to use Celery for a Url grabber. I have a list of Url, and I must do a HTTP request on every URL and write the result in a file (same file for the whole list). My first idea was to make this code in the task which is called by Celery beat every n minutes : @app.task def get_urls(self): results = [get_url_content.si( url=url ) for url in urls] ch = chain( group(*results), write_result_on_disk.s() ) return ch() This code works pretty well, but there is 1 problem : I have a thousand of