Class: Sidekiq::Middleware::I18n::Server
- Inherits:
-
Object
- Object
- Sidekiq::Middleware::I18n::Server
- Includes:
- ServerMiddleware
- Defined in:
- lib/sidekiq/middleware/i18n.rb
Overview
Pull the msg locale out and set the current thread to use it.
Instance Attribute Summary
Attributes included from ServerMiddleware
Instance Method Summary collapse
Methods included from ServerMiddleware
Instance Method Details
#call(_jobclass, job, _queue, &block) ⇒ Object
25 26 27 |
# File 'lib/sidekiq/middleware/i18n.rb', line 25 def call(_jobclass, job, _queue, &block) I18n.with_locale(job.fetch("locale", I18n.default_locale), &block) end |