Fixed the RabbitMQ thingy

This commit is contained in:
Albert Santoni 2014-04-22 11:40:35 -04:00
parent f106bf8fad
commit a79f53758f
1 changed files with 3 additions and 2 deletions

View File

@ -84,9 +84,10 @@ class Application_Model_RabbitMq
{ {
//Hack for Airtime Pro. The RabbitMQ settings for communicating with airtime_analyzer are global //Hack for Airtime Pro. The RabbitMQ settings for communicating with airtime_analyzer are global
//and shared between all instances on Airtime Pro. //and shared between all instances on Airtime Pro.
$CC_CONFIG = Config::getConfig();
$devEnv = "production"; //Default $devEnv = "production"; //Default
if (array_key_exists("dev_env", $config["general"])) { if (array_key_exists("dev_env", $CC_CONFIG["general"])) {
$devEnv = $config["general"]["dev_env"]; $devEnv = $CC_CONFIG["general"]["dev_env"];
} }
$config = parse_ini_file("/etc/airtime-saas/rabbitmq-analyzer-" . $devEnv . ".ini", true); $config = parse_ini_file("/etc/airtime-saas/rabbitmq-analyzer-" . $devEnv . ".ini", true);
$conn = new AMQPConnection($config["rabbitmq"]["host"], $conn = new AMQPConnection($config["rabbitmq"]["host"],