Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 7f54bce

Browse files
author
Ahmed Ammar
committed
test.
1 parent a8cfee0 commit 7f54bce

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

lib/logstash/inputs/dynamodb.rb

+12-10
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,17 @@ def scan(logstash_queue)
284284
start_table_copy_thread
285285

286286
scan_queue = @logstash_writer.getQueue()
287-
while !$exit
288-
if !scan_queue.empty?
287+
# while !$exit
288+
# if !scan_queue.empty?
289+
while true
289290
event = scan_queue.take()
290291
if event.getEntry().nil? and event.getSize() == -1
291292
break
292293
end # if event.isEmpty()
293294
queue_event(@parser.parse_scan(event.getEntry(), event.getSize()), logstash_queue, @host)
294-
else
295-
sleep(0.01)
296-
end
295+
# else
296+
# sleep(0.01)
297+
# end
297298
end # while true
298299
end
299300

@@ -302,13 +303,14 @@ def stream(logstash_queue)
302303
@logger.info("Starting stream...")
303304
start_kcl_thread
304305

305-
while !$exit
306-
if !@queue.empty?
306+
# while !$exit
307+
while true
308+
307309
event = @queue.pop()
308310
queue_event(@parser.parse_stream(event), logstash_queue, @host)
309-
else
310-
sleep(0.01)
311-
end
311+
# else
312+
# sleep(0.01)
313+
# end
312314
end # while true
313315
end
314316

0 commit comments

Comments
 (0)