1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Rescue any error unmarshalling yaml, fixes #2244

This commit is contained in:
Mike Perham 2015-03-19 08:38:34 -07:00
parent 1a1134c2d8
commit c7b9f082f4
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,8 @@
HEAD
3.3.3
-----------
- Fix crash on exit when Redis is down [#2235]
- Fix duplicate logging on startup
- Undeprecate delay extension for ActionMailer 4.2+ . [#2186]
3.3.2

View file

@ -341,7 +341,7 @@ module Sidekiq
def safe_load(content, default)
begin
yield(*YAML.load(content))
rescue ::ArgumentError => ex
rescue => ex
# #1761 in dev mode, it's possible to have jobs enqueued which haven't been loaded into
# memory yet so the YAML can't be loaded.
Sidekiq.logger.warn "Unable to load YAML: #{ex.message}" unless Sidekiq.options[:environment] == 'development'