Skip to content

Commit

Permalink
Fix ES compatibility for sidekiq-unique-jobs (#6)
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 99691d0 commit e4e2457
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/sidekiq/logging/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def log_job(payload, started_at, exc = nil)
# Needs to map all args to strings for ElasticSearch compatibility
payload['args'].map!(&:to_s)

# Needs to map all unique_args to strings for ElasticSearch compatibility in case sidekiq-unique-jobs is used
payload['unique_args'].map!(&:to_s) if payload['unique_args']

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

0 comments on commit e4e2457

Please sign in to comment.