Pull the msg locale out and set the current thread to use it.
21 22 23 24
# File 'lib/faktory/middleware/i18n.rb', line 21 def call(jobinst, payload) locale = payload.dig("custom", "locale") || I18n.default_locale I18n.with_locale(locale) { yield } end