Skip to content
代码片段 群组 项目
未验证 提交 d133de66 编辑于 作者: Marius Bobin's avatar Marius Bobin
浏览文件

Add comment to explain why we're sorting the rows

上级 a7d75d0b
No related branches found
No related tags found
2 合并请求!106Draft: This MR is specified for doc sync check,!105Draft:This MR is specified for docsynccheck, will not be merged
...@@ -43,6 +43,9 @@ def perform ...@@ -43,6 +43,9 @@ def perform
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)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册