mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
retrieve rabbitmq configuration from configuration.yml
This commit is contained in:
@@ -36,6 +36,7 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
||||
'host' => 'localhost',
|
||||
'port' => 5672,
|
||||
'user' => 'guest',
|
||||
'password' => 'guest',
|
||||
'vhost' => '/'
|
||||
]
|
||||
];
|
||||
@@ -46,8 +47,10 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
||||
|
||||
$queueConfigurations = $configuration->get(['workers', 'queue'], $defaultConfiguration);
|
||||
|
||||
$queueConfiguration = reset($queueConfigurations);
|
||||
$queueKey = key($queueConfigurations);
|
||||
$config = [];
|
||||
|
||||
foreach($queueConfigurations as $name => $queueConfiguration) {
|
||||
$queueKey = $name;
|
||||
|
||||
if (! isset($queueConfiguration['name'])) {
|
||||
if (! is_string($queueKey)) {
|
||||
@@ -57,7 +60,8 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
||||
$queueConfiguration['name'] = $queueKey;
|
||||
}
|
||||
|
||||
$config = [ $queueConfiguration['name'] => $queueConfiguration ];
|
||||
$config[$queueConfiguration['name']] = $queueConfiguration ;
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
Reference in New Issue
Block a user