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

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

Overview

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

Instance Attribute Summary

Attributes included from ServerMiddleware

#config

Instance Method Summary collapse

Methods included from ServerMiddleware

#logger, #redis, #redis_pool

Instance Method Details

#call(_jobclass, job, _queue, _redis) ⇒ Object



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

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