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
Jérome Perrin
gitlab-ce
Commits
84175072
Commit
84175072
authored
Aug 21, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assign all pipeline workers to specific queues
parent
48776f27
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
27 additions
and
0 deletions
+27
-0
app/workers/expire_pipeline_cache_worker.rb
app/workers/expire_pipeline_cache_worker.rb
+2
-0
app/workers/pipeline_hooks_worker.rb
app/workers/pipeline_hooks_worker.rb
+2
-0
app/workers/pipeline_metrics_worker.rb
app/workers/pipeline_metrics_worker.rb
+2
-0
app/workers/pipeline_notification_worker.rb
app/workers/pipeline_notification_worker.rb
+2
-0
app/workers/pipeline_process_worker.rb
app/workers/pipeline_process_worker.rb
+2
-0
app/workers/pipeline_success_worker.rb
app/workers/pipeline_success_worker.rb
+2
-0
config/sidekiq_queues.yml
config/sidekiq_queues.yml
+3
-0
spec/workers/expire_pipeline_cache_worker_spec.rb
spec/workers/expire_pipeline_cache_worker_spec.rb
+2
-0
spec/workers/pipeline_hooks_worker_spec.rb
spec/workers/pipeline_hooks_worker_spec.rb
+2
-0
spec/workers/pipeline_metrics_worker_spec.rb
spec/workers/pipeline_metrics_worker_spec.rb
+2
-0
spec/workers/pipeline_notification_worker_spec.rb
spec/workers/pipeline_notification_worker_spec.rb
+2
-0
spec/workers/pipeline_process_worker_spec.rb
spec/workers/pipeline_process_worker_spec.rb
+2
-0
spec/workers/pipeline_success_worker_spec.rb
spec/workers/pipeline_success_worker_spec.rb
+2
-0
No files found.
app/workers/expire_pipeline_cache_worker.rb
View file @
84175072
...
...
@@ -2,6 +2,8 @@ class ExpirePipelineCacheWorker
include
Sidekiq
::
Worker
include
PipelineQueue
enqueue_in
group: :cache
def
perform
(
pipeline_id
)
pipeline
=
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
)
return
unless
pipeline
...
...
app/workers/pipeline_hooks_worker.rb
View file @
84175072
...
...
@@ -2,6 +2,8 @@ class PipelineHooksWorker
include
Sidekiq
::
Worker
include
PipelineQueue
enqueue_in
group: :hooks
def
perform
(
pipeline_id
)
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
)
.
try
(
:execute_hooks
)
...
...
app/workers/pipeline_metrics_worker.rb
View file @
84175072
...
...
@@ -2,6 +2,8 @@ class PipelineMetricsWorker
include
Sidekiq
::
Worker
include
PipelineQueue
enqueue_in
group: :metrics
def
perform
(
pipeline_id
)
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
).
try
do
|
pipeline
|
update_metrics_for_active_pipeline
(
pipeline
)
if
pipeline
.
active?
...
...
app/workers/pipeline_notification_worker.rb
View file @
84175072
...
...
@@ -2,6 +2,8 @@ class PipelineNotificationWorker
include
Sidekiq
::
Worker
include
PipelineQueue
enqueue_in
group: :hooks
def
perform
(
pipeline_id
,
recipients
=
nil
)
pipeline
=
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
)
...
...
app/workers/pipeline_process_worker.rb
View file @
84175072
...
...
@@ -2,6 +2,8 @@ class PipelineProcessWorker
include
Sidekiq
::
Worker
include
PipelineQueue
enqueue_in
group: :processing
def
perform
(
pipeline_id
)
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
)
.
try
(
:process!
)
...
...
app/workers/pipeline_success_worker.rb
View file @
84175072
...
...
@@ -2,6 +2,8 @@ class PipelineSuccessWorker
include
Sidekiq
::
Worker
include
PipelineQueue
enqueue_in
group: :processing
def
perform
(
pipeline_id
)
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
).
try
do
|
pipeline
|
MergeRequests
::
MergeWhenPipelineSucceedsService
...
...
config/sidekiq_queues.yml
View file @
84175072
...
...
@@ -28,6 +28,9 @@
- [build, 2]
- [pipeline, 2]
- [pipeline_processing, 2]
- [pipeline_cache, 2]
- [pipeline_metrics, 2]
- [pipeline_hooks, 2]
- [gitlab_shell, 2]
- [email_receiver, 2]
- [emails_on_push, 2]
...
...
spec/workers/expire_pipeline_cache_worker_spec.rb
View file @
84175072
...
...
@@ -43,4 +43,6 @@ describe ExpirePipelineCacheWorker do
subject
.
perform
(
pipeline
.
id
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_hooks_worker_spec.rb
View file @
84175072
...
...
@@ -20,4 +20,6 @@ describe PipelineHooksWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_metrics_worker_spec.rb
View file @
84175072
...
...
@@ -47,4 +47,6 @@ describe PipelineMetricsWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_notification_worker_spec.rb
View file @
84175072
...
...
@@ -16,4 +16,6 @@ describe PipelineNotificationWorker, :mailer do
subject
.
perform
(
Ci
::
Pipeline
.
maximum
(
:id
).
to_i
.
succ
)
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_process_worker_spec.rb
View file @
84175072
...
...
@@ -19,4 +19,6 @@ describe PipelineProcessWorker do
end
end
end
it_behaves_like
'sidekiq worker'
end
spec/workers/pipeline_success_worker_spec.rb
View file @
84175072
...
...
@@ -21,4 +21,6 @@ describe PipelineSuccessWorker 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