Skip to content

Commit

Permalink
Convert 'retry' to string for ES compatibility when integer (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matus Vacula authored and iMacTia committed Aug 23, 2018
1 parent 74b5432 commit 99691d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/sidekiq/logging/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def log_job(payload, started_at, exc = nil)
# Needs to map all args to strings for ElasticSearch compatibility
payload['args'].map!(&:to_s)

if payload['retry'].is_a?(Integer)
payload['max_retries'] = payload['retry']
payload['retry'] = true
end

payload
end

Expand Down

0 comments on commit 99691d0

Please sign in to comment.