Class: ActiveHook::Server::MessageRunner
- Inherits:
-
Object
- Object
- ActiveHook::Server::MessageRunner
- Defined in:
- lib/activehook/server/queue.rb
Instance Method Summary collapse
-
#initialize(json) ⇒ MessageRunner
constructor
A new instance of MessageRunner.
- #start ⇒ Object
Constructor Details
#initialize(json) ⇒ MessageRunner
37 38 39 40 41 |
# File 'lib/activehook/server/queue.rb', line 37 def initialize(json) = Message.new(JSON.parse(json)) @post = Send.new(message: ) 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::Server.redis.with do |conn| @post.success? ? (conn) : (conn) end end |