mirror of
https://github.com/ditkrg/rabbit_carrots.git
synced 2026-01-22 22:06:40 +00:00
Add exchange_name parameter to run_task method for enhanced configuration flexibility
This commit is contained in:
parent
dd329804ae
commit
274bec3e68
@ -77,7 +77,7 @@ module RabbitCarrots
|
|||||||
@running = false
|
@running = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_task(queue_name:, handler_class:, routing_keys:, queue_arguments: {}, kill_to_restart_on_standard_error: false)
|
def run_task(queue_name:, handler_class:, routing_keys:, queue_arguments: {}, exchange_name: nil, kill_to_restart_on_standard_error: false)
|
||||||
RabbitCarrots::Connection.instance.channel.with do |channel|
|
RabbitCarrots::Connection.instance.channel.with do |channel|
|
||||||
exchange = channel.topic(exchange_name || RabbitCarrots.configuration.rabbitmq_exchange_name, durable: true)
|
exchange = channel.topic(exchange_name || RabbitCarrots.configuration.rabbitmq_exchange_name, durable: true)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user