chore: Move Twilio event processing to background job (#11094)
- Twilio events were being processed synchronously, leading to slow API responses. - This change moves Twilio event processing to a background job to improve performance and align with how other events (e.g., WhatsApp) are handled. --------- Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Twilio::CallbackController < ApplicationController
|
||||
def create
|
||||
::Twilio::IncomingMessageService.new(params: permitted_params).perform
|
||||
Webhooks::TwilioEventsJob.perform_later(permitted_params.to_unsafe_hash)
|
||||
|
||||
head :no_content
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Twilio::DeliveryStatusController < ApplicationController
|
||||
def create
|
||||
::Twilio::DeliveryStatusService.new(params: permitted_params).perform
|
||||
Webhooks::TwilioDeliveryStatusJob.perform_later(permitted_params.to_unsafe_hash)
|
||||
|
||||
head :no_content
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user