Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-02-20 15:33:03 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-02-20 15:33:03 +0400
commit99760edc757b24796d5db1f5328d55f483e4c33c (patch)
tree7ba9e6fa67060d9fed076902e874065248a61221 /app/services/system_hooks_service.rb
parentaa1780d03c7ceb916c2e122b841d3d4ebc5ce597 (diff)
Method moved to service
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r--app/services/system_hooks_service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
index 1d53f3baf33..6043bac672c 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -7,10 +7,14 @@ class SystemHooksService
def self.execute_hooks(data)
SystemHook.all.each do |sh|
- sh.async_execute data
+ async_execute_hook sh, data
end
end
+ def self.async_execute_hook(hook, data)
+ Sidekiq::Client.enqueue(SystemHookWorker, hook, data)
+ end
+
def self.build_event_data(model, event)
data = {
event_name: build_event_name(model, event),