diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2012-07-15 15:29:06 +0300 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2012-07-19 00:25:10 +0300 |
commit | f5908cef19a3cd2c44be02b453fecb568b2c6c8e (patch) | |
tree | e52c65ff40d483450d10dcf008077c95c1b91b78 /app/models/system_hook.rb | |
parent | c38578428b19b6375f24266ea5f4a98ca290eb58 (diff) | |
download | gitlab-ce-f5908cef19a3cd2c44be02b453fecb568b2c6c8e.tar.gz |
System Hook: implemented
Diffstat (limited to 'app/models/system_hook.rb')
-rw-r--r-- | app/models/system_hook.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/system_hook.rb b/app/models/system_hook.rb index 178b7585d5b..8517d43a9de 100644 --- a/app/models/system_hook.rb +++ b/app/models/system_hook.rb @@ -1,3 +1,13 @@ 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 |