Class: ActiveHook::Server::HookRunner
- Inherits:
-
Object
- Object
- ActiveHook::Server::HookRunner
- Defined in:
- lib/activehook/server/queue.rb
Instance Method Summary collapse
-
#initialize(json) ⇒ HookRunner
constructor
A new instance of HookRunner.
- #start ⇒ Object
Constructor Details
#initialize(json) ⇒ HookRunner
Returns a new instance of HookRunner.
37 38 39 40 41 |
# File 'lib/activehook/server/queue.rb', line 37 def initialize(json) @hook = Hook.new(JSON.parse(json)) @post = Send.new(hook: @hook) start end |
Instance Method Details
#start ⇒ Object
43 44 45 46 47 48 |
# File 'lib/activehook/server/queue.rb', line 43 def start @post.start ActiveHook.redis.with do |conn| @post.success? ? hook_success(conn) : hook_failed(conn) end end |