Merge pull request #22318 from edx/aehsan/prod-987/fixing_oom_issue_for_notify_credentials

Fixing notify credentials job
This commit is contained in:
adeelehsan
2019-11-22 20:54:56 +05:00
committed by GitHub

View File

@@ -64,9 +64,10 @@ def paged_query(queryset, delay, page_size):
if delay and page:
time.sleep(delay)
for i, item in enumerate(subquery, start=1):
yield page_start + i, item
index = 0
for item in subquery.iterator():
index += 1
yield page_start + index, item
class Command(BaseCommand):