mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 00:25:53 +08:00
504cfcff96
Implement avatar picker Correct avatar related jobs
16 lines
331 B
Ruby
16 lines
331 B
Ruby
module Jobs
|
|
class CreateMissingAvatars < Jobs::Scheduled
|
|
every 1.hour
|
|
def execute(args)
|
|
User.where(uploaded_avatar_id: nil).find_each do |u|
|
|
u.refresh_avatar
|
|
u.save
|
|
end
|
|
|
|
UserAvatar.where(system_upload_id: nil).find_each do |a|
|
|
a.update_system_avatar!
|
|
end
|
|
end
|
|
end
|
|
end
|