workaround issue where orphan user_avatar record exists
This commit is contained in:
parent
54cfba56dc
commit
ce5867cce2
|
@ -5,6 +5,7 @@ module Jobs
|
|||
def execute(args)
|
||||
# backfill in batches of 5000 an hour
|
||||
UserAvatar.includes(:user)
|
||||
.joins(:user)
|
||||
.where(last_gravatar_download_attempt: nil)
|
||||
.order("users.last_posted_at DESC")
|
||||
.limit(5000)
|
||||
|
|
Loading…
Reference in New Issue