mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
BUGFIX: ensure it tries downloading avatars
This commit is contained in:
parent
0bc3525b10
commit
3e36d0698c
1 changed files with 4 additions and 4 deletions
|
@ -9,11 +9,11 @@ module Jobs
|
|||
end
|
||||
|
||||
# backfill in batches 5000 an hour
|
||||
User.where(uploaded_avatar_id: nil)
|
||||
.order("last_posted_at desc")
|
||||
UserAvatar.where(last_gravatar_download_attempt: nil).includes(:user)
|
||||
.order("users.last_posted_at desc")
|
||||
.limit(5000).each do |u|
|
||||
u.refresh_avatar
|
||||
u.save
|
||||
u.user.refresh_avatar
|
||||
u.user.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue