Sha256: 2e08026443ce15dd0ab7bd39d55a1fb00d3a66cb0247e07cae050f726700aa71

Contents?: true

Size: 503 Bytes

Versions: 3

Compression:

Stored size: 503 Bytes

Contents

module Bobot
  class DeliverJob < ApplicationJob
    queue_as do
      if Bobot.config.commander_queue_name.present?
        Bobot.config.commander_queue_name
      else
        :default
      end
    end

    def perform(target_facebook_uid:, access_token:, payload_template:)
      Bobot::Commander.deliver(
        body: {
          recipient: { id: target_facebook_uid },
        }.merge(payload_template),
        query: {
          access_token: access_token,
        },
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bobot-3.0.7 app/jobs/bobot/deliver_job.rb
bobot-3.0.6 app/jobs/bobot/deliver_job.rb
bobot-3.0.5 app/jobs/bobot/deliver_job.rb