communicate_whatsapp_job.rb 455 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class CommunicateWhatsappJob < ApplicationJob
  3. retry_on Service::Ticket::Article::Type::TemporaryDeliveryError, attempts: 4, wait: lambda { |executions|
  4. executions * 120.seconds
  5. }
  6. def perform(article_id)
  7. whatsapp_message_deliver = Service::Ticket::Article::Type::WhatsappMessage::Deliver.new(article_id: article_id)
  8. whatsapp_message_deliver.execute
  9. end
  10. end