Correct query so it scopes correctly
This commit is contained in:
parent
7c6a0c7690
commit
ce6c25afed
|
@ -9,7 +9,7 @@ module Jobs
|
||||||
# backfill in batches 1000 an hour
|
# backfill in batches 1000 an hour
|
||||||
User.where(uploaded_avatar_id: nil)
|
User.where(uploaded_avatar_id: nil)
|
||||||
.order("last_posted_at desc")
|
.order("last_posted_at desc")
|
||||||
.limit(1000).find_each do |u|
|
.limit(1000).each do |u|
|
||||||
u.refresh_avatar
|
u.refresh_avatar
|
||||||
u.save
|
u.save
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue