Merge pull request #3052 from Undev/system-hook-observer-improves

System hooks code & logic refactoring
This commit is contained in:
Dmitriy Zaporozhets 2013-02-25 10:15:23 -08:00
commit 9611640e38
4 changed files with 103 additions and 68 deletions

View file

@ -12,13 +12,4 @@
#
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
end