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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ed4e682e
Commit
ed4e682e
authored
Dec 29, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix async services execution broken in 7.6
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b07802ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
app/models/project_services/slack_message.rb
app/models/project_services/slack_message.rb
+8
-8
app/workers/project_service_worker.rb
app/workers/project_service_worker.rb
+1
-0
app/workers/project_web_hook_worker.rb
app/workers/project_web_hook_worker.rb
+2
-1
No files found.
app/models/project_services/slack_message.rb
View file @
ed4e682e
require
'slack-notifier'
class
SlackMessage
attr_reader
:after
attr_reader
:before
attr_reader
:commits
attr_reader
:project_name
attr_reader
:project_url
attr_reader
:ref
attr_reader
:username
def
initialize
(
params
)
@after
=
params
.
fetch
(
:after
)
@before
=
params
.
fetch
(
:before
)
...
...
@@ -23,14 +31,6 @@ class SlackMessage
private
attr_reader
:after
attr_reader
:before
attr_reader
:commits
attr_reader
:project_name
attr_reader
:project_url
attr_reader
:ref
attr_reader
:username
def
message
if
new_branch?
new_branch_message
...
...
app/workers/project_service_worker.rb
View file @
ed4e682e
...
...
@@ -4,6 +4,7 @@ class ProjectServiceWorker
sidekiq_options
queue: :project_web_hook
def
perform
(
hook_id
,
data
)
data
=
data
.
with_indifferent_access
Service
.
find
(
hook_id
).
execute
(
data
)
end
end
app/workers/project_web_hook_worker.rb
View file @
ed4e682e
...
...
@@ -4,6 +4,7 @@ class ProjectWebHookWorker
sidekiq_options
queue: :project_web_hook
def
perform
(
hook_id
,
data
)
WebHook
.
find
(
hook_id
).
execute
data
data
=
data
.
with_indifferent_access
WebHook
.
find
(
hook_id
).
execute
(
data
)
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