diff options
Diffstat (limited to 'app/models/hooks/system_hook.rb')
-rw-r--r-- | app/models/hooks/system_hook.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/hooks/system_hook.rb b/app/models/hooks/system_hook.rb index c147d8762a9..bacd42ec60a 100644 --- a/app/models/hooks/system_hook.rb +++ b/app/models/hooks/system_hook.rb @@ -19,4 +19,10 @@ # class SystemHook < WebHook + scope :push_hooks, -> { where(push_events: true) } + scope :tag_push_hooks, -> { where(tag_push_events: true) } + + def async_execute(data, hook_name) + Sidekiq::Client.enqueue(SystemHookWorker, id, data, hook_name) + end end |