cosmetical cleanup of models
This commit is contained in:
parent
2a4359a572
commit
841e4fbd08
18 changed files with 108 additions and 226 deletions
|
@ -1,3 +1,15 @@
|
|||
class SystemHook < WebHook
|
||||
def async_execute(data)
|
||||
Resque.enqueue(SystemHookWorker, id, data)
|
||||
end
|
||||
|
||||
def self.all_hooks_fire(data)
|
||||
SystemHook.all.each do |sh|
|
||||
sh.async_execute data
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: web_hooks
|
||||
|
@ -9,17 +21,3 @@
|
|||
# updated_at :datetime not null
|
||||
# type :string(255) default("ProjectHook")
|
||||
#
|
||||
|
||||
class SystemHook < WebHook
|
||||
|
||||
def async_execute(data)
|
||||
Resque.enqueue(SystemHookWorker, id, data)
|
||||
end
|
||||
|
||||
def self.all_hooks_fire(data)
|
||||
SystemHook.all.each do |sh|
|
||||
sh.async_execute data
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue