mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: ensure we only ever enqueue 1 UpdateGravatar job
This commit is contained in:
parent
fad017d842
commit
868e70e817
1 changed files with 2 additions and 1 deletions
|
@ -753,7 +753,8 @@ class User < ActiveRecord::Base
|
|||
avatar = user_avatar || create_user_avatar
|
||||
|
||||
if SiteSetting.automatically_download_gravatars? && !avatar.last_gravatar_download_attempt
|
||||
Jobs.enqueue(:update_gravatar, user_id: self.id, avatar_id: avatar.id)
|
||||
Jobs.cancel_scheduled_job(:update_gravatar, user_id: self.id, avatar_id: avatar.id)
|
||||
Jobs.enqueue_in(1.second, :update_gravatar, user_id: self.id, avatar_id: avatar.id)
|
||||
end
|
||||
|
||||
# mark all the user's quoted posts as "needing a rebake"
|
||||
|
|
Loading…
Reference in a new issue