2014-05-27 21:50:49 -04:00
|
|
|
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
|
2014-06-06 13:19:32 -04:00
|
|
|
user.user_avatar.update_gravatar!
|
2014-05-27 21:50:49 -04:00
|
|
|
putc "." if (i+=1)%10 == 0
|
|
|
|
end
|
|
|
|
puts
|
|
|
|
end
|