مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
added ability to use clustered rabbitmq
هذا الالتزام موجود في:
ملتزم من قبل
Charlie Smurthwaite
الأصل
1cf5767cd5
التزام
9f2e3ca1fa
@@ -5,8 +5,16 @@ module Postal
|
|||||||
module RabbitMQ
|
module RabbitMQ
|
||||||
|
|
||||||
def self.create_connection
|
def self.create_connection
|
||||||
|
bunny_host = [ 'localhost' ]
|
||||||
|
|
||||||
|
if Postal.config.rabbitmq&.host.is_a?(Array)
|
||||||
|
bunny_host = Postal.config.rabbitmq&.host
|
||||||
|
elsif Postal.config.rabbitmq&.host.is_a?(String)
|
||||||
|
bunny_host = [ Postal.config.rabbitmq&.host ]
|
||||||
|
end
|
||||||
|
|
||||||
conn = Bunny.new(
|
conn = Bunny.new(
|
||||||
:host => Postal.config.rabbitmq&.host || 'localhost',
|
:hosts => bunny_host,
|
||||||
:port => Postal.config.rabbitmq&.port || 5672,
|
:port => Postal.config.rabbitmq&.port || 5672,
|
||||||
:username => Postal.config.rabbitmq&.username || 'guest',
|
:username => Postal.config.rabbitmq&.username || 'guest',
|
||||||
:password => Postal.config.rabbitmq&.password || 'guest',
|
:password => Postal.config.rabbitmq&.password || 'guest',
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم