Skip to content
Snippets Groups Projects
Commit d2852720 authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

Update worker run has_results by batches of 1000

parent 976c2013
No related branches found
No related tags found
1 merge request!2238Update worker run has_results by batches of 1000
......@@ -199,7 +199,7 @@ class WorkerRunQuerySet(QuerySet):
queryset = list(self.annotate(new_has_results=self.has_results_expression()).only("id"))
for run in queryset:
run.has_results = run.new_has_results
self.bulk_update(queryset, ["has_results"])
self.bulk_update(queryset, ["has_results"], 1000)
def has_results_expression(self):
return reduce(operator.or_, [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment