lib/fluent/plugin/out_redis.rb in fluent-plugin-redis-0.3.3 vs lib/fluent/plugin/out_redis.rb in fluent-plugin-redis-0.3.4
- old
+ new
@@ -72,11 +72,11 @@
def multi_workers_ready?
true
end
def write(chunk)
- tag, time = expand_placeholders(chunk.metadata)
+ tag, time = expand_placeholders(chunk)
@redis.pipelined {
unless @allow_duplicate_key
stream = chunk.to_msgpack_stream
@unpacker.feed_each(stream).with_index { |record, index|
identifier = if @running_multi_workers
@@ -100,12 +100,12 @@
}
end
private
- def expand_placeholders(metadata)
- tag = extract_placeholders(@insert_key_prefix, metadata)
- time = extract_placeholders(@strftime_format, metadata)
+ def expand_placeholders(chunk)
+ tag = extract_placeholders(@insert_key_prefix, chunk)
+ time = extract_placeholders(@strftime_format, chunk)
return tag, time
end
end
end