Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
20de2480
Commit
20de2480
authored
6 years ago
by
Shinya Maeda
Committed by
Alessio Caiazza
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix stuck ci jobs worker
parent
6eee8d2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
app/workers/stuck_ci_jobs_worker.rb
app/workers/stuck_ci_jobs_worker.rb
+1
-1
No files found.
app/workers/stuck_ci_jobs_worker.rb
View file @
20de2480
...
...
@@ -76,7 +76,7 @@ class StuckCiJobsWorker
# `ci_builds` table has a partial index on `id` with `scheduled_at <> NULL` condition.
# Therefore this query's first step uses Index Search, and the following expensive
# filter `scheduled_at < ?` will only perform on a small subset (max: 100 rows)
Ci
::
Build
.
include
(
EachBach
).
where
(
'scheduled_at <> NULL'
).
each_batch
(
of:
100
)
do
|
relation
|
Ci
::
Build
.
include
(
EachBa
t
ch
).
where
(
'scheduled_at <> NULL'
).
each_batch
(
of:
100
)
do
|
relation
|
relation
.
where
(
'scheduled_at < ?'
,
BUILD_SCHEDULED_OUTDATED_TIMEOUT
.
ago
).
find_each
do
|
build
|
drop_build
(
:outdated
,
build
,
:scheduled
,
BUILD_SCHEDULED_OUTDATED_TIMEOUT
,
:schedule_expired
)
end
...
...
This diff is collapsed.
Click to expand it.
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