Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#957 | importers | indexing job to take a bi…
Browse files Browse the repository at this point in the history
…gger batch and iterate using iterator
  • Loading branch information
snyaggarwal committed Jan 2, 2024
1 parent a8d36f8 commit 93d016e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/importers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,11 +782,11 @@ def run(self): # pylint: disable=too-many-branches,too-many-statements,too-many
continue

if new_concept_ids:
for chunk in chunks(list(set(new_concept_ids)), 1000):
for chunk in chunks(list(set(new_concept_ids)), 5000):
batch_index_resources.apply_async(
('concept', {'id__in': chunk}, True), queue='indexing')
if new_mapping_ids:
for chunk in chunks(list(set(new_mapping_ids)), 1000):
for chunk in chunks(list(set(new_mapping_ids)), 5000):
batch_index_resources.apply_async(
('mapping', {'id__in': chunk}, True), queue='indexing')

Expand Down

0 comments on commit 93d016e

Please sign in to comment.