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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7f270d04
Commit
7f270d04
authored
Oct 04, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not return false in commit status transition
parent
4e4640b1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
app/models/commit_status.rb
app/models/commit_status.rb
+1
-1
app/workers/process_pipeline_worker.rb
app/workers/process_pipeline_worker.rb
+2
-3
app/workers/update_pipeline_worker.rb
app/workers/update_pipeline_worker.rb
+2
-3
No files found.
app/models/commit_status.rb
View file @
7f270d04
...
...
@@ -71,7 +71,7 @@ class CommitStatus < ActiveRecord::Base
after_transition
do
|
commit_status
,
transition
|
commit_status
.
pipeline
.
try
do
|
pipeline
|
return
false
if
transition
.
loopback?
break
if
transition
.
loopback?
if
commit_status
.
complete?
ProcessPipelineWorker
.
perform_async
(
pipeline
.
id
)
...
...
app/workers/process_pipeline_worker.rb
View file @
7f270d04
...
...
@@ -4,8 +4,7 @@ class ProcessPipelineWorker
sidekiq_options
queue: :default
def
perform
(
pipeline_id
)
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
).
try
do
|
pipeline
|
pipeline
.
process!
end
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
)
.
try
(
:process!
)
end
end
app/workers/update_pipeline_worker.rb
View file @
7f270d04
...
...
@@ -4,8 +4,7 @@ class UpdatePipelineWorker
sidekiq_options
queue: :default
def
perform
(
pipeline_id
)
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
).
try
do
|
pipeline
|
pipeline
.
update_status
end
Ci
::
Pipeline
.
find_by
(
id:
pipeline_id
)
.
try
(
:update_status
)
end
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