Class: Sidekiq::Middleware::I18n::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/middleware/i18n.rb

Overview

Get the current locale and store it in the message to be sent to Sidekiq.

Instance Method Summary collapse

Instance Method Details

#call(_worker, msg, _queue, _redis) ⇒ Object



13
14
15
16
# File 'lib/sidekiq/middleware/i18n.rb', line 13

def call(_worker, msg, _queue, _redis)
  msg["locale"] ||= I18n.locale
  yield
end