BUGFIX: ensure it tries downloading avatars
This commit is contained in:
parent
0bc3525b10
commit
3e36d0698c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue