chore: Migrate from the worker to jobs

This commit is contained in:
Pranav
2025-08-28 14:11:03 -07:00
parent 88cb5ba56f
commit fe9ce0f472
9 changed files with 318 additions and 120 deletions
-16
View File
@@ -1,16 +0,0 @@
class EmailReplyWorker
include Sidekiq::Worker
sidekiq_options queue: :mailers, retry: 3
def perform(message_id)
message = Message.find(message_id)
return unless message.email_notifiable_message?
# send the email
ConversationReplyMailer.with(account: message.account).email_reply(message).deliver_now
rescue StandardError => e
ChatwootExceptionTracker.new(e, account: message.account).capture_exception
Messages::StatusUpdateService.new(message, 'failed', e.message).perform
end
end