lib/fluent/plugin/out_select.rb in fluent-plugin-select-0.0.3 vs lib/fluent/plugin/out_select.rb in fluent-plugin-select-0.0.3.1
- old
+ new
@@ -37,21 +37,21 @@
end
def do_select(tag, es)
output_es = MultiEventStream.new
es.each {|time, record|
- timeout_block{
+ timeout_block(tag, time, record){
if eval(@select)
output_es.add(time, record)
else
$log.trace {"filtered: #{Time.at(time)} #{tag} #{record.inspect}"}
end
}
}
output_es
end
- def timeout_block
+ def timeout_block(tag, time, record)
begin
Timeout.timeout(@timeout){
yield
}
rescue Timeout::Error