lib/sidekiq/logging/shared.rb in sidekiq-logstash-0.3.0 vs lib/sidekiq/logging/shared.rb in sidekiq-logstash-1.0.0

- old
+ new

@@ -36,9 +36,17 @@ end # 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 + end + payload end def elapsed(start) (Time.now.utc - start).round(3)