class Sidekiq::Middleware::I18n::Server

Pull the msg locale out and set the current thread to use it.

Public Instance Methods

call(_jobclass, job, _queue, &block) click to toggle source
# File lib/sidekiq/middleware/i18n.rb, line 23
def call(_jobclass, job, _queue, &block)
  I18n.with_locale(job.fetch("locale", I18n.default_locale), &block)
end