# frozen_string_literal: true

module SolidusSubscriptions
  class ProcessInstallmentJob < ApplicationJob
    queue_as SolidusSubscriptions.configuration.processing_queue

    def perform(installment)
      Checkout.new(installment).process
    end
  end
end

# frozen_string_literal: true

module SolidusSubscriptions
  class ProcessInstallmentJob < ApplicationJob
    queue_as { SolidusSubscriptions.configuration.processing_queue }

    def perform(installment)
      Checkout.new(installment).process
    end
  end
end

Set queue on `ProcessInstallmentJob` dynamically
Set queue on `ProcessInstallmentJob` dynamically

By setting the queue through a block rather than a boot-time method
call, we ensure to play nicely with configuration stubs and in other
non-obvious scenarios.
