Make Irker service use the supported events check

This commit is contained in:
Stan Hu 2015-03-04 22:31:28 +00:00
parent 63178a9509
commit 6ddd45948f
1 changed files with 8 additions and 2 deletions

View File

@ -63,9 +63,15 @@ class IrkerService < Service
'irker'
end
def execute(push_data)
def supported_events
%w(push)
end
def execute(data)
return unless supported_events.include?(data[:object_kind])
IrkerWorker.perform_async(project_id, channels,
colorize_messages, push_data, @settings)
colorize_messages, data, @settings)
end
def fields