Skip to content

Commit 039f770

Browse files
committed
renamed teardown to close
1 parent f12bf34 commit 039f770

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/logstash/outputs/redis.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ def congestion_check(key)
192192
end
193193

194194
# called from Stud::Buffer#buffer_flush when there are events to flush
195-
def flush(events, key, teardown=false)
195+
def flush(events, key, close=false)
196196
@redis ||= connect
197-
# we should not block due to congestion on teardown
197+
# we should not block due to congestion on close
198198
# to support this Stud::Buffer#buffer_flush should pass here the :final boolean value.
199-
congestion_check(key) unless teardown
199+
congestion_check(key) unless close
200200
@redis.rpush(key, events)
201201
end
202202
# called from Stud::Buffer#buffer_flush when an error occurs
@@ -209,7 +209,7 @@ def on_flush_error(e)
209209
@redis = connect
210210
end
211211

212-
def teardown
212+
def close
213213
if @batch
214214
buffer_flush(:final => true)
215215
end

spec/outputs/redis_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
CONFIG
7373

7474
agent do
75-
# we have to wait for teardown to execute & flush the last batch.
75+
# we have to wait for close to execute & flush the last batch.
7676
# otherwise we might start doing assertions before everything has been
7777
# sent out to redis.
7878
sleep 2

0 commit comments

Comments
 (0)