Added utity to Slice a queryset into chunks.
The function slices a queryset into smaller QuerySets containing chunk_size objects and then yields them. It is
used to avoid memory error when processing huge querysets, and also to avoid database errors due to the
database pulling the whole table at once. Additionally, without using a chunked queryset, concurrent database
modification while processing a large table might repeat or skip some entries.
Description:
JIRA:
ENT-4236
Dependencies:
List dependencies on other outstanding PRs, issues, etc.
Merge deadline:
List merge deadline (if any)
Installation instructions:
List any non-trivial installation instructions.
Testing instructions:
Reviewers:
Merge checklist:
Post merge:
Author concerns:
List any concerns about this PR - inelegant solutions, hacks, quick-and-dirty implementations, concerns about migrations, etc.