Commit e6a3b29b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Patricio Cano

Fix async services execution broken in 7.6

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 0286222e
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
......
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment