fix: Profile pictures missing in facebook inbox [CW-1976] (#9212)
The ActiveJob FacebookEventsJob created a Contact and then enqueued Avatar::AvatarFromUrlJob in another process. However, since the Contact was created within a transaction when AvatarFromUrlJob was executed immediately afterwards, the Contact was not actually present in the database then. Fixes: #6138 #6761
This commit is contained in:
@@ -19,10 +19,10 @@ class ContactInboxWithContactBuilder
|
|||||||
|
|
||||||
ActiveRecord::Base.transaction(requires_new: true) do
|
ActiveRecord::Base.transaction(requires_new: true) do
|
||||||
build_contact_with_contact_inbox
|
build_contact_with_contact_inbox
|
||||||
|
end
|
||||||
update_contact_avatar(@contact) unless @contact.avatar.attached?
|
update_contact_avatar(@contact) unless @contact.avatar.attached?
|
||||||
@contact_inbox
|
@contact_inbox
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user