I'm using Carrierwave-Backgrounder with Sidekiq to process User icons. Unfortunately, every time I update the User model it triggers CarrierWave::Workers::ProcessAsset to process the existing image. Is there a way to make the backgrounder run only if the User has an icon or changes an existing one? I've tried everything...
user.rb
class User < ActiveRecord::Base
mount_uploader :icon, IconUploader
process_in_background :icon
icon_uploader.rb
class IconUploader < CarrierWave::Uploader::Base
include ::CarrierWave::Backgrounder::Delay
INFO: Booting Sidekiq 2.14.1 using redis://localhost:6379/0 with options
INFO: Running in ruby 2.0.0p247 (2013-06-27 revision 41674)
INFO: Starting processing, hit Ctrl-C to stopCarrierWave::Workers::ProcessAsset JID-f2c19a1e33e83be2dce31961 INFO: start CarrierWave::Workers::ProcessAsset JID-f2c19a1e33e83be2dce31961 INFO: done: 0.733 sec CarrierWave::Workers::ProcessAsset JID-a497e66f54609f76678db81a INFO: start CarrierWave::Workers::ProcessAsset JID-a497e66f54609f76678db81a INFO: done: 0.32 sec CarrierWave::Workers::ProcessAsset JID-576dd9a036323e700e86860c INFO: start CarrierWave::Workers::ProcessAsset JID-576dd9a036323e700e86860c INFO: done: 0.588 sec
User
model which is "dirtying" theicon
attribute. – davogones