Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d133de66
Commit
d133de66
authored
Aug 25, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment to explain why we're sorting the rows
parent
a7d75d0b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
app/workers/stuck_ci_jobs_worker.rb
app/workers/stuck_ci_jobs_worker.rb
+3
-0
No files found.
app/workers/stuck_ci_jobs_worker.rb
View file @
d133de66
...
@@ -43,6 +43,9 @@ class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker
...
@@ -43,6 +43,9 @@ class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker
private
private
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
# We're adding the ordering clause by `created_at` and `project_id`
# because we want to force the query planner to use the
# `ci_builds_gitlab_monitor_metrics` index all the time.
def
pending_builds
(
timeout
)
def
pending_builds
(
timeout
)
if
Feature
.
enabled?
(
:ci_new_query_for_pending_stuck_jobs
)
if
Feature
.
enabled?
(
:ci_new_query_for_pending_stuck_jobs
)
Ci
::
Build
.
pending
.
created_at_before
(
timeout
).
updated_at_before
(
timeout
).
order
(
created_at: :asc
,
project_id: :asc
)
Ci
::
Build
.
pending
.
created_at_before
(
timeout
).
updated_at_before
(
timeout
).
order
(
created_at: :asc
,
project_id: :asc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment