1
0
Fork 0
forked from OpenNeo/impress
impress/lib/tasks/outfits.rake

12 lines
429 B
Ruby
Raw Normal View History

2012-07-31 07:20:37 -07:00
namespace :outfits do
desc 'Retroactively enqueue image updates for outfits saved to user accounts'
task :retroactively_enqueue => :environment do
outfits = Outfit.select([:id]).where('image IS NULL AND user_id IS NOT NULL')
puts "Enqueuing #{outfits.count} outfits"
outfits.find_each do |outfit|
Resque.enqueue(OutfitImageUpdate::Retroactive, outfit.id)
end
puts "Successfully enqueued."
end
end