Kouhei Sutou
null+****@clear*****
Tue Jan 16 09:20:48 JST 2018
Kouhei Sutou 2018-01-16 09:20:48 +0900 (Tue, 16 Jan 2018) New Revision: ca640d8d56e5857825ab23e9d8e43b4714890bda https://github.com/groonga/fluent-plugin-groonga/commit/ca640d8d56e5857825ab23e9d8e43b4714890bda Message: out: simplify Modified files: lib/fluent/plugin/out_groonga.rb Modified: lib/fluent/plugin/out_groonga.rb (+4 -3) =================================================================== --- lib/fluent/plugin/out_groonga.rb 2018-01-16 09:19:30 +0900 (f7fdcf0) +++ lib/fluent/plugin/out_groonga.rb 2018-01-16 09:20:48 +0900 (00e4e55) @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2017 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2012-2018 Kouhei Sutou <kou �� clear-code.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -579,14 +579,15 @@ module Fluent records = [] chunk.msgpack_each do |message| tag, _, record = message - if /\Agroonga\.command\./ =~ tag + case tag + when /\Agroonga\.command\./ name = $POSTMATCH unless records.empty? store_records(records) records.clear end @client.execute(name, record) - elsif tag == "groonga.command" + when "groonga.command" name = record["name"] arguments = record["arguments"] @client.execute(name, arguments) -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180116/3d51c700/attachment.htm