Skip to content

Commit 2e79d4a

Browse files
committed
refactor out_sql
Signed-off-by: Masahiro Nakagawa <[email protected]>
1 parent 2c4b493 commit 2e79d4a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/fluent/plugin/out_sql.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def import(chunk, output)
9090
chunk.msgpack_each { |time, data|
9191
begin
9292
data = output.inject_values_to_record(tag, time, data)
93-
# format process should be moved to emit / format after supports error stream.
9493
records << @model.new(@format_proc.call(data))
9594
rescue => e
9695
args = {error: e, table: @table, record: Yajl.dump(data)}
@@ -105,7 +104,7 @@ def import(chunk, output)
105104
@log.warn "Got deterministic error. Fallback to one-by-one import", error: e
106105
one_by_one_import(records)
107106
else
108-
$log.warn "Got deterministic error. Fallback is disabled", error: e
107+
@log.warn "Got deterministic error. Fallback is disabled", error: e
109108
raise e
110109
end
111110
end
@@ -172,7 +171,6 @@ def configure(conf)
172171
@tables << te
173172
end
174173
}
175-
@only_default = @tables.empty?
176174

177175
if @default_table.nil?
178176
raise Fluent::ConfigError, "There is no default table. <table> is required in sql output"

0 commit comments

Comments
 (0)