mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 19:36:22 +08:00
2791852bd8
BUGFIX: made system letter avatar more thinner for less block look
25 lines
541 B
Ruby
25 lines
541 B
Ruby
desc "Rebuild all system avatars"
|
|
task "avatars:rebuild_system" => :environment do
|
|
i = 0
|
|
puts "Regenerating system avatars"
|
|
puts
|
|
UserAvatar.find_each do |a|
|
|
a.update_system_avatar!
|
|
putc "." if (i+=1)%10 == 0
|
|
end
|
|
puts
|
|
end
|
|
|
|
desc "Refresh all avatars (download missing gravatars, refresh system)"
|
|
task "avatars:refresh" => :environment do
|
|
i = 0
|
|
puts "Refreshing avatars"
|
|
puts
|
|
User.find_each do |user|
|
|
user.refresh_avatar
|
|
user.user_avatar.update_system_avatar!
|
|
putc "." if (i+=1)%10 == 0
|
|
end
|
|
puts
|
|
end
|