parent
ef1d117717
commit
19c637eb33
2 changed files with 4 additions and 2 deletions
|
@ -9,8 +9,10 @@ class Inboxes::FetchImapEmailsJob < ApplicationJob
|
||||||
fetch_mail_for_channel(channel)
|
fetch_mail_for_channel(channel)
|
||||||
# clearing old failures like timeouts since the mail is now successfully processed
|
# clearing old failures like timeouts since the mail is now successfully processed
|
||||||
channel.reauthorized!
|
channel.reauthorized!
|
||||||
rescue Errno::ECONNREFUSED, Net::OpenTimeout, Net::IMAP::NoResponseError
|
rescue Errno::ECONNREFUSED, Net::OpenTimeout, Net::IMAP::NoResponseError, Errno::ECONNRESET, Errno::ENETUNREACH, Net::IMAP::ByeResponseError
|
||||||
channel.authorization_error!
|
channel.authorization_error!
|
||||||
|
rescue EOFError => e
|
||||||
|
Rails.logger.error e
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
ChatwootExceptionTracker.new(e, account: channel.account).capture_exception
|
ChatwootExceptionTracker.new(e, account: channel.account).capture_exception
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,7 +35,7 @@ module MailboxHelper
|
||||||
|
|
||||||
def create_contact
|
def create_contact
|
||||||
@contact_inbox = ::ContactBuilder.new(
|
@contact_inbox = ::ContactBuilder.new(
|
||||||
source_id: "email:#{processed_mail.message_id}",
|
source_id: processed_mail.original_sender,
|
||||||
inbox: @inbox,
|
inbox: @inbox,
|
||||||
contact_attributes: {
|
contact_attributes: {
|
||||||
name: identify_contact_name,
|
name: identify_contact_name,
|
||||||
|
|
Loading…
Reference in a new issue