fix avatars:regenerate rake task

This commit is contained in:
Régis Hanol 2013-11-06 12:32:27 +01:00
parent 1dcbe9c1c0
commit 86a60113a6

View File

@ -3,8 +3,8 @@ task "avatars:regenerate" => :environment do
RailsMultisite::ConnectionManagement.each_connection do |db|
puts "Generating avatars for: #{db}"
User.select(:uploaded_avatar_id).where("uploaded_avatar_id IS NOT NULL").all.each do |u|
Jobs.enqueue(:generate_avatars, upload_id: u.uploaded_avatar_id)
User.where("uploaded_avatar_id IS NOT NULL").all.each do |u|
Jobs.enqueue(:generate_avatars, upload_id: u.uploaded_avatar_id, user_id: u.id)
putc "."
end