Added dev env to RabbitMQ stuff for Analyzer (fixed)

This commit is contained in:
Albert Santoni 2014-04-22 12:28:20 -04:00
parent a79f53758f
commit 43483dc112
2 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ class Config {
$CC_CONFIG['baseUrl'] = $values['general']['base_url']; $CC_CONFIG['baseUrl'] = $values['general']['base_url'];
$CC_CONFIG['basePort'] = $values['general']['base_port']; $CC_CONFIG['basePort'] = $values['general']['base_port'];
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir']; $CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
$CC_CONFIG['dev_env'] = $values['general']['dev_env'];
$CC_CONFIG['cache_ahead_hours'] = $values['general']['cache_ahead_hours']; $CC_CONFIG['cache_ahead_hours'] = $values['general']['cache_ahead_hours'];

View File

@ -84,10 +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(); $CC_CONFIG = Config::getConfig();
$devEnv = "production"; //Default $devEnv = "production"; //Default
if (array_key_exists("dev_env", $CC_CONFIG["general"])) { if (array_key_exists("dev_env", $CC_CONFIG)) {
$devEnv = $CC_CONFIG["general"]["dev_env"]; $devEnv = $CC_CONFIG["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"],