Sidekiq Jobs::CreateThumbnails Error

After updating to the latest version (v1.3.0.beta10 +48), my Discourse has been printing some errors to the log:

Message

Job exception: undefined local variable or method `max' for #<Jobs::CreateThumbnails:0x007ff4cc284b00>

Backtrace

/var/www/discourse/app/jobs/regular/create_thumbnails.rb:26:in `block (2 levels) in create_thumbnails_for_avatar'
/usr/local/lib/ruby/2.0.0/set.rb:232:in `each_key'
/usr/local/lib/ruby/2.0.0/set.rb:232:in `each'
/var/www/discourse/app/jobs/regular/create_thumbnails.rb:24:in `block in create_thumbnails_for_avatar'
/var/www/discourse/app/jobs/regular/create_thumbnails.rb:23:in `each'
/var/www/discourse/app/jobs/regular/create_thumbnails.rb:23:in `create_thumbnails_for_avatar'
/var/www/discourse/app/jobs/regular/create_thumbnails.rb:17:in `execute'
/var/www/discourse/app/jobs/base.rb:153:in `block (2 levels) in perform'

Env

current_db: default
current_hostname: [redacted]
job: Jobs::CreateThumbnails
problem_db: default

opts:
  upload_id: 83
  type: avatar
  current_site_id: default

Sidekiq keeps queuing these taks for “Retry” but they keep failing.

Steps to Reproduce:

Unknown

Thanks for reporting this issue. It will soon be fixed as a part of a larger commit.

2 Likes

Just extracted the fix and pushed it :goat:

https://github.com/discourse/discourse/commit/c3227b69fa383f1fc29b3e2714a978d92e281d94

3 Likes