Merge pull request #22318 from edx/aehsan/prod-987/fixing_oom_issue_for_notify_credentials
Fixing notify credentials job
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user