Class: Barbeque::MessageHandler::Notification

Inherits:
JobExecution show all
Defined in:
lib/barbeque/message_handler/notification.rb

Instance Method Summary collapse

Methods inherited from JobExecution

#execution_log, #retry_if_possible!, #retryable?, #to_param

Constructor Details

#initialize(message:, message_queue:) ⇒ Notification

Returns a new instance of Notification.

Parameters:



8
9
10
11
12
13
14
# File 'lib/barbeque/message_handler/notification.rb', line 8

def initialize(message:, message_queue:)
  @message = message
  @message_queue = message_queue

  subscription = SNSSubscription.find_by!(topic_arn: @message.topic_arn, job_queue_id: @message_queue.job_queue.id)
  @message.set_params_from_subscription(subscription)
end