2021-07-14 06:54:09 +00:00
|
|
|
class TriggerScheduledItemsJob < ApplicationJob
|
|
|
|
queue_as :scheduled_jobs
|
|
|
|
|
|
|
|
def perform
|
|
|
|
# trigger the scheduled campaign jobs
|
|
|
|
Campaign.where(campaign_type: :one_off, campaign_status: :active).where(scheduled_at: 3.days.ago..Time.current).all.each do |campaign|
|
|
|
|
Campaigns::TriggerOneoffCampaignJob.perform_later(campaign)
|
|
|
|
end
|
2021-07-23 09:54:07 +00:00
|
|
|
|
|
|
|
# Job to reopen snoozed conversations
|
|
|
|
Conversations::ReopenSnoozedConversationsJob.perform_later
|
2021-11-27 03:56:18 +00:00
|
|
|
|
|
|
|
# Job to auto-resolve conversations
|
|
|
|
Account::ConversationsResolutionSchedulerJob.perform_later
|
2021-07-14 06:54:09 +00:00
|
|
|
end
|
|
|
|
end
|