System hooks execution moved to System hook service

This commit is contained in:
Andrew8xx8 2013-02-20 14:53:15 +04:00
parent 468c8c5f0a
commit aa1780d03c
4 changed files with 98 additions and 63 deletions

View file

@ -12,12 +12,6 @@
#
class SystemHook < WebHook
def self.all_hooks_fire(data)
SystemHook.all.each do |sh|
sh.async_execute data
end
end
def async_execute(data)
Sidekiq::Client.enqueue(SystemHookWorker, id, data)
end