gitlabhq/app/models/system_hook.rb

25 lines
510 B
Ruby
Raw Normal View History

class SystemHook < WebHook
2012-07-15 15:29:06 +03:00
def self.all_hooks_fire(data)
SystemHook.all.each do |sh|
sh.async_execute data
end
end
2012-10-09 04:10:04 +04:00
def async_execute(data)
Resque.enqueue(SystemHookWorker, id, data)
end
end
2012-09-26 23:20:36 -07:00
# == Schema Information
#
# Table name: web_hooks
#
# id :integer not null, primary key
# url :string(255)
# project_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# type :string(255) default("ProjectHook")
#
2012-10-09 11:14:17 +03:00