GS Cache: Stream multiple responses content as JSON
When extract files, we stream the result content in JSON. There's no
problem when files number is limited. However, when extracting many
files, say > 700, we have to split the requests into sub-requests. We
have to consolidate all response together and stream all of them into
*one* JSON stream.
This change refactor the old iter_content_as_json function to a class
which add queue the response multiple times. Finally, we call `stream`
to stream all responses in JSON.
TEST=Ran unit tests.
Commit-Ready: Congbin Guo <firstname.lastname@example.org>
Tested-by: Congbin Guo <email@example.com>
Reviewed-by: Congbin Guo <firstname.lastname@example.org>
2 files changed