mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
14 lines
380 B
Ruby
14 lines
380 B
Ruby
desc "re-generate avatars"
|
|
task "avatars:regenerate" => :environment do
|
|
RailsMultisite::ConnectionManagement.each_connection do |db|
|
|
puts "Generating avatars for: #{db}"
|
|
|
|
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
|
|
|
|
end
|
|
puts "\ndone."
|
|
end
|