[Groonga-commit] groonga/fluent-plugin-groonga at 8f45330 [fluentd-v0.12] out: simplify

Back to archive index

Yasuhiro Horimoto null+****@clear*****
Tue Jan 16 12:23:53 JST 2018


Yasuhiro Horimoto	2018-01-16 12:23:53 +0900 (Tue, 16 Jan 2018)

  New Revision: 8f453300ff2fc554e93fa50ae1ed68702e136494
  https://github.com/groonga/fluent-plugin-groonga/commit/8f453300ff2fc554e93fa50ae1ed68702e136494

  Merged 638bad8: Merge pull request #26 from komainu8/fluentd-v0.12

  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 12:17:39 +0900 (a5f560f)
+++ lib/fluent/plugin/out_groonga.rb    2018-01-16 12:23:53 +0900 (0d98964)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2012-2014  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2012-2018  Yasuhiro Horimoto <horimoto �� 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
@@ -567,14 +567,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/e4345be3/attachment-0003.htm 



More information about the Groonga-commit mailing list
Back to archive index