mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
13 lines
299 B
Ruby
13 lines
299 B
Ruby
|
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
|