• J
    Fixes #20799 · 3860e6b2
    Johannes Opper 提交于
    When `#perform_later` is called the locale isn't stored on the
    queue, which results in a locale reset when the job is performed.
    
    An example of the problem:
    
        I18n.locale = 'de'
        HelloJob.perform_now # german message, correct
    
    but
    
        I18n.locale = 'de'
        HelloJob.perform_later # english message, incorrect
    
    This PR attaches the current I18n.locale to every job during the
    serialization process. It is then restored during deserialization
    and used to perform the job with the correct locale.
    
    It falls back to the default locale if no serialized locale is
    found in order to provide backward compatibility with previously
    stored jobs. It is not necessary to clear the queue for the update.
    3860e6b2
可在Tags中查看这些版本中当前仓库的状态.
CHANGELOG.md 2.7 KB