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:
Sojan Jose
2022-06-14 23:46:36 +05:30
committed by GitHub
parent 1bb0371c1d
commit fdcaed75f6
12 changed files with 88 additions and 9 deletions

View File

@@ -0,0 +1,7 @@
class Channels::Whatsapp::TemplatesSyncJob < ApplicationJob
queue_as :low
def perform(whatsapp_channel)
whatsapp_channel.sync_templates
end
end