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',
|
'host' => 'localhost',
|
||||||
'port' => 5672,
|
'port' => 5672,
|
||||||
'user' => 'guest',
|
'user' => 'guest',
|
||||||
|
'password' => 'guest',
|
||||||
'vhost' => '/'
|
'vhost' => '/'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
@@ -46,8 +47,10 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
|||||||
|
|
||||||
$queueConfigurations = $configuration->get(['workers', 'queue'], $defaultConfiguration);
|
$queueConfigurations = $configuration->get(['workers', 'queue'], $defaultConfiguration);
|
||||||
|
|
||||||
$queueConfiguration = reset($queueConfigurations);
|
$config = [];
|
||||||
$queueKey = key($queueConfigurations);
|
|
||||||
|
foreach($queueConfigurations as $name => $queueConfiguration) {
|
||||||
|
$queueKey = $name;
|
||||||
|
|
||||||
if (! isset($queueConfiguration['name'])) {
|
if (! isset($queueConfiguration['name'])) {
|
||||||
if (! is_string($queueKey)) {
|
if (! is_string($queueKey)) {
|
||||||
@@ -57,7 +60,8 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
|||||||
$queueConfiguration['name'] = $queueKey;
|
$queueConfiguration['name'] = $queueKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = [ $queueConfiguration['name'] => $queueConfiguration ];
|
$config[$queueConfiguration['name']] = $queueConfiguration ;
|
||||||
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user