BUGFIX: ensure it tries downloading avatars

This commit is contained in:
Sam 2014-05-28 17:57:15 +10:00
parent 0bc3525b10
commit 3e36d0698c
1 changed files with 4 additions and 4 deletions

View File

@ -9,11 +9,11 @@ module Jobs
end end
# backfill in batches 5000 an hour # backfill in batches 5000 an hour
User.where(uploaded_avatar_id: nil) UserAvatar.where(last_gravatar_download_attempt: nil).includes(:user)
.order("last_posted_at desc") .order("users.last_posted_at desc")
.limit(5000).each do |u| .limit(5000).each do |u|
u.refresh_avatar u.user.refresh_avatar
u.save u.user.save
end end
end end
end end