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
4c936682
Commit
4c936682
authored
Aug 21, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove sidekiq build queue and assign pipeline queue
parent
84175072
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
25 additions
and
27 deletions
+25
-27
app/workers/build_coverage_worker.rb
app/workers/build_coverage_worker.rb
+3
-1
app/workers/build_finished_worker.rb
app/workers/build_finished_worker.rb
+3
-1
app/workers/build_hooks_worker.rb
app/workers/build_hooks_worker.rb
+3
-1
app/workers/build_success_worker.rb
app/workers/build_success_worker.rb
+3
-1
app/workers/concerns/build_queue.rb
app/workers/concerns/build_queue.rb
+0
-8
app/workers/expire_job_cache_worker.rb
app/workers/expire_job_cache_worker.rb
+3
-1
spec/workers/build_coverage_worker_spec.rb
spec/workers/build_coverage_worker_spec.rb
+2
-0
spec/workers/build_finished_worker_spec.rb
spec/workers/build_finished_worker_spec.rb
+2
-0
spec/workers/build_hooks_worker_spec.rb
spec/workers/build_hooks_worker_spec.rb
+2
-0
spec/workers/build_success_worker_spec.rb
spec/workers/build_success_worker_spec.rb
+2
-0
spec/workers/concerns/build_queue_spec.rb
spec/workers/concerns/build_queue_spec.rb
+0
-14
spec/workers/expire_job_cache_worker_spec.rb
spec/workers/expire_job_cache_worker_spec.rb
+2
-0
No files found.
app/workers/build_coverage_worker.rb
View file @
4c936682
class
BuildCoverageWorker
include
Sidekiq
::
Worker
include
BuildQueue
include
PipelineQueue
enqueue_in
group: :processing
def
perform
(
build_id
)
Ci
::
Build
.
find_by
(
id:
build_id
)
&
.
update_coverage
...
...
app/workers/build_finished_worker.rb
View file @
4c936682
class
BuildFinishedWorker
include
Sidekiq
::
Worker
include
BuildQueue
include
PipelineQueue
enqueue_in
group: :processing
def
perform
(
build_id
)
Ci
::
Build
.
find_by
(
id:
build_id
).
try
do
|
build
|
...
...
app/workers/build_hooks_worker.rb
View file @
4c936682
class
BuildHooksWorker
include
Sidekiq
::
Worker
include
BuildQueue
include
PipelineQueue
enqueue_in
group: :hooks
def
perform
(
build_id
)
Ci
::
Build
.
find_by
(
id:
build_id
)
...
...
app/workers/build_success_worker.rb
View file @
4c936682
class
BuildSuccessWorker
include
Sidekiq
::
Worker
include
BuildQueue
include
PipelineQueue
enqueue_in
group: :processing
def
perform
(
build_id
)
Ci
::
Build
.
find_by
(
id:
build_id
).
try
do
|
build
|
...
...
app/workers/concerns/build_queue.rb
deleted
100644 → 0
View file @
84175072
# Concern for setting Sidekiq settings for the various CI build workers.
module
BuildQueue
extend
ActiveSupport
::
Concern
included
do
sidekiq_options
queue: :build
end
end
app/workers/expire_job_cache_worker.rb
View file @
4c936682
class
ExpireJobCacheWorker
include
Sidekiq
::
Worker
include
BuildQueue
include
PipelineQueue
enqueue_in
group: :cache
def
perform
(
job_id
)
job
=
CommitStatus
.
joins
(
:pipeline
,
:project
).
find_by
(
id:
job_id
)
...
...
spec/workers/build_coverage_worker_spec.rb
View file @
4c936682
...
...
@@ -20,4 +20,6 @@ describe BuildCoverageWorker do
end
end
end
it_behaves_like
'sidekiq_worker'
end
spec/workers/build_finished_worker_spec.rb
View file @
4c936682
...
...
@@ -27,4 +27,6 @@ describe BuildFinishedWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/build_hooks_worker_spec.rb
View file @
4c936682
...
...
@@ -20,4 +20,6 @@ describe BuildHooksWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/build_success_worker_spec.rb
View file @
4c936682
...
...
@@ -33,4 +33,6 @@ describe BuildSuccessWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/concerns/build_queue_spec.rb
deleted
100644 → 0
View file @
84175072
require
'spec_helper'
describe
BuildQueue
do
let
(
:worker
)
do
Class
.
new
do
include
Sidekiq
::
Worker
include
BuildQueue
end
end
it
'sets the queue name of a worker'
do
expect
(
worker
.
sidekiq_options
[
'queue'
].
to_s
).
to
eq
(
'build'
)
end
end
spec/workers/expire_job_cache_worker_spec.rb
View file @
4c936682
...
...
@@ -28,4 +28,6 @@ describe ExpireJobCacheWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
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