2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Correct query so it scopes correctly

This commit is contained in:
Sam 2014-05-27 22:17:04 +10:00
parent 7c6a0c7690
commit ce6c25afed

View file

@ -9,7 +9,7 @@ module Jobs
# backfill in batches 1000 an hour
User.where(uploaded_avatar_id: nil)
.order("last_posted_at desc")
.limit(1000).find_each do |u|
.limit(1000).each do |u|
u.refresh_avatar
u.save
end