Class: Droonga::Plugins::Watch::FeedHandler
- Includes:
- SchemaCreatable
- Defined in:
- lib/droonga/plugins/watch.rb
Instance Attribute Summary
Attributes inherited from Handler
Instance Method Summary collapse
- #handle(message) ⇒ Object
-
#initialize(*args) ⇒ FeedHandler
constructor
A new instance of FeedHandler.
Methods inherited from Handler
Methods included from Droonga::Pluggable
Constructor Details
#initialize(*args) ⇒ FeedHandler
Returns a new instance of FeedHandler.
127 128 129 130 |
# File 'lib/droonga/plugins/watch.rb', line 127 def initialize(*args) super ensure_schema_created # TODO: REMOVE ME end |
Instance Method Details
#handle(message) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/droonga/plugins/watch.rb', line 132 def handle() request = .request watcher = Watcher.new(@context) watcher.feed(:targets => request["targets"]) do |route, subscribers| = { "to" => subscribers, "body" => request, } = .raw.merge() messenger.forward(, "to" => route, "type" => "watch.publish") end nil end |