Skip to content

Commit

Permalink
rewritten retry state with the above recommendations in mind.
Browse files Browse the repository at this point in the history
Signed-off-by: Oleh  <trahterber@gmail.com>
  • Loading branch information
OlehPalanskyi committed Apr 25, 2024
1 parent 6529888 commit 52fd079
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/fluent/plugin/in_opensearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,10 @@ def update_retry_state(error=nil)
log.warn("failed to connect or search.", retry_times: @retry.steps, next_retry_time: @retry.next_time.round, error: error.message)
sleep(@retry.next_time - Time.now)
else
log.debug("retry succeeded.") unless @retry.nil?
@retry = nil unless @retry.nil?
unless @retry.nil?
log.debug("retry succeeded.")
@retry = nil
end
end
end

Expand Down

0 comments on commit 52fd079

Please sign in to comment.