Merge pull request #3052 from Undev/system-hook-observer-improves
System hooks code & logic refactoring
This commit is contained in:
commit
9611640e38
4 changed files with 103 additions and 68 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue