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.
126 127 128 129 |
# File 'lib/droonga/plugins/watch.rb', line 126 def initialize(*args) super ensure_schema_created # TODO: REMOVE ME end |
Instance Method Details
#handle(message) ⇒ Object
131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/droonga/plugins/watch.rb', line 131 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 |