diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-29 17:48:43 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-29 17:48:43 +0200 |
commit | ed4e682eb809de9103c713a6604a732345e57529 (patch) | |
tree | 26e0c9d9e1d12bc5299e748374b0972c75850117 | |
parent | b07802ab684d2126f84f927a21191a79d200788d (diff) | |
download | gitlab-ce-ed4e682eb809de9103c713a6604a732345e57529.tar.gz |
Fix async services execution broken in 7.6
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/models/project_services/slack_message.rb | 16 | ||||
-rw-r--r-- | app/workers/project_service_worker.rb | 1 | ||||
-rw-r--r-- | app/workers/project_web_hook_worker.rb | 3 |
3 files changed, 11 insertions, 9 deletions
diff --git a/app/models/project_services/slack_message.rb b/app/models/project_services/slack_message.rb index 28204e5ea60..d0ddb1f162c 100644 --- a/app/models/project_services/slack_message.rb +++ b/app/models/project_services/slack_message.rb @@ -1,6 +1,14 @@ 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 diff --git a/app/workers/project_service_worker.rb b/app/workers/project_service_worker.rb index cc0a7f25664..64d39c4d3f7 100644 --- a/app/workers/project_service_worker.rb +++ b/app/workers/project_service_worker.rb @@ -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 diff --git a/app/workers/project_web_hook_worker.rb b/app/workers/project_web_hook_worker.rb index 9f9b9b1df5f..73085c046bd 100644 --- a/app/workers/project_web_hook_worker.rb +++ b/app/workers/project_web_hook_worker.rb @@ -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 |