chore: Move Whatsapp template sync to cron (#4858)
syncing WhatsApp templates job is moved to a cron job for a better user experience. The Templates are synced at 15-minute intervals now.
This commit is contained in:
@@ -6,7 +6,7 @@ describe Whatsapp::IncomingMessageService do
|
||||
stub_request(:post, 'https://waba.360dialog.io/v1/configs/webhook')
|
||||
end
|
||||
|
||||
let!(:whatsapp_channel) { create(:channel_whatsapp) }
|
||||
let!(:whatsapp_channel) { create(:channel_whatsapp, sync_templates: false) }
|
||||
|
||||
context 'when valid text message params' do
|
||||
it 'creates appropriate conversations, message and contacts' do
|
||||
|
||||
@@ -15,7 +15,7 @@ describe Whatsapp::SendOnWhatsappService do
|
||||
|
||||
context 'when a valid message' do
|
||||
let(:whatsapp_request) { double }
|
||||
let!(:whatsapp_channel) { create(:channel_whatsapp) }
|
||||
let!(:whatsapp_channel) { create(:channel_whatsapp, sync_templates: false) }
|
||||
let!(:contact_inbox) { create(:contact_inbox, inbox: whatsapp_channel.inbox, source_id: '123456789') }
|
||||
let!(:conversation) { create(:conversation, contact_inbox: contact_inbox, inbox: whatsapp_channel.inbox) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user