Skip to content

Commit

Permalink
fix: queue
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-star-l committed Dec 10, 2024
1 parent 6ffacbd commit 50400bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension/logstash/lib/logstash/outputs/doris.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def handle_request(documents, http_headers, event_num, req_count)
req_count += 1
@logger.warn("Will do retry #{req_count} after #{sleep_for} secs.")
timer_task = RetryTimerTask.new(@retry_queue, @count_block_queue, [documents, http_headers, event_num, req_count])
@count_block_queue.add(0)
@count_block_queue.put(0)
@timer.schedule(timer_task, sleep_for*1000)
end

Expand Down
2 changes: 1 addition & 1 deletion extension/logstash/lib/logstash/util/retry_timer_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ def initialize(retry_queue, count_block_queue, event)

def run
@retry_queue << @event
@count_block_queue.pull
@count_block_queue.poll
end
end

0 comments on commit 50400bc

Please sign in to comment.