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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
10acdc30
Commit
10acdc30
authored
May 31, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename find_stale. Fix worker name in declaration.
parent
fb1e35e5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
app/models/ci/build_trace_chunk.rb
app/models/ci/build_trace_chunk.rb
+1
-1
app/workers/all_queues.yml
app/workers/all_queues.yml
+1
-1
app/workers/ci/rescue_stale_live_trace_worker.rb
app/workers/ci/rescue_stale_live_trace_worker.rb
+1
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+3
-3
No files found.
app/models/ci/build_trace_chunk.rb
View file @
10acdc30
...
...
@@ -52,7 +52,7 @@ module Ci
end
# Find stale live traces and return their build ids
def
find_stale
(
finished_before:
1
.
hour
.
ago
)
def
find_stale
_in_batches
(
finished_before:
1
.
hour
.
ago
)
include
(
EachBatch
)
.
select
(
:build_id
)
.
group
(
:build_id
)
...
...
app/workers/all_queues.yml
View file @
10acdc30
...
...
@@ -17,7 +17,7 @@
-
cronjob:stuck_ci_jobs
-
cronjob:stuck_import_jobs
-
cronjob:stuck_merge_jobs
-
cronjob:rescue_stale_live_trace
-
cronjob:
ci_
rescue_stale_live_trace
-
cronjob:trending_projects
-
cronjob:issue_due_scheduler
...
...
app/workers/ci/rescue_stale_live_trace_worker.rb
View file @
10acdc30
...
...
@@ -9,7 +9,7 @@ module Ci
# The targets are jobs with the following conditions
# - Jobs had been finished 1 hour ago, but they don't have an archived trace yet
# This could happen when their sidekiq-jobs are lost by SIGKILL
Ci
::
BuildTraceChunk
.
find_stale
(
finished_before:
1
.
hour
.
ago
)
do
|
build_ids
|
Ci
::
BuildTraceChunk
.
find_stale
_in_batches
(
finished_before:
1
.
hour
.
ago
)
do
|
build_ids
|
Ci
::
Build
.
where
(
id:
build_ids
).
find_each
do
|
build
|
begin
build
.
trace
.
archive!
...
...
config/initializers/1_settings.rb
View file @
10acdc30
...
...
@@ -289,9 +289,9 @@ Settings.cron_jobs['repository_archive_cache_worker']['job_class'] = 'Repository
Settings
.
cron_jobs
[
'import_export_project_cleanup_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'import_export_project_cleanup_worker'
][
'cron'
]
||=
'0 * * * *'
Settings
.
cron_jobs
[
'import_export_project_cleanup_worker'
][
'job_class'
]
=
'ImportExportProjectCleanupWorker'
Settings
.
cron_jobs
[
'rescue_stale_live_trace_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'rescue_stale_live_trace_worker'
][
'cron'
]
||=
'17 * * * *'
Settings
.
cron_jobs
[
'rescue_stale_live_trace_worker'
][
'job_class'
]
=
'RescueStaleLiveTraceWorker'
Settings
.
cron_jobs
[
'
ci_
rescue_stale_live_trace_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'
ci_
rescue_stale_live_trace_worker'
][
'cron'
]
||=
'17 * * * *'
Settings
.
cron_jobs
[
'
ci_
rescue_stale_live_trace_worker'
][
'job_class'
]
=
'RescueStaleLiveTraceWorker'
Settings
.
cron_jobs
[
'requests_profiles_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'requests_profiles_worker'
][
'cron'
]
||=
'0 0 * * *'
Settings
.
cron_jobs
[
'requests_profiles_worker'
][
'job_class'
]
=
'RequestsProfilesWorker'
...
...
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