Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
d2852720
Commit
d2852720
authored
1 year ago
by
ml bonhomme
Committed by
Erwan Rouchet
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update worker run has_results by batches of 1000
parent
976c2013
No related branches found
No related tags found
1 merge request
!2238
Update worker run has_results by batches of 1000
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/process/managers.py
+1
-1
1 addition, 1 deletion
arkindex/process/managers.py
with
1 addition
and
1 deletion
arkindex/process/managers.py
+
1
−
1
View file @
d2852720
...
...
@@ -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_
,
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment