Skip to content

Commit

Permalink
Add iterator() call in BatchInspector, to prevent Celery worker from …
Browse files Browse the repository at this point in the history
…getting killed
  • Loading branch information
wetneb committed Sep 28, 2024
1 parent f20dd76 commit 86c5e6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tagging/batchinspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ def inspect_batches_since(self, since_time):
batches modified since the given time.
"""
queryset = Batch.objects.filter(Q(tags__id__in = self.tags_for_diff_inspection) | Q(nb_new_pages__gt = 0), last_modified__gt=since_time, archived=False).order_by('ended').distinct()
for batch in queryset:
for batch in queryset.iterator():
self.add_missing_tags(batch)

0 comments on commit 86c5e6d

Please sign in to comment.