Fix for Airtime bandwidth limit suspension code
This commit is contained in:
parent
0fc4f6c26f
commit
a67ae0a5e4
|
@ -162,12 +162,12 @@ class ApiController extends Zend_Controller_Action
|
||||||
$usage = Application_Model_Preference::getBandwidthLimitCounter();
|
$usage = Application_Model_Preference::getBandwidthLimitCounter();
|
||||||
if ($usage > Application_Model_Preference::getBandwidthLimit()) {
|
if ($usage > Application_Model_Preference::getBandwidthLimit()) {
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$url = AIRTIMEPRO_API_URL . "/station/" . $CC_CONFIG['stationId'] . "/suspend";
|
// Hacky way to get the user ID...
|
||||||
|
$url = AIRTIMEPRO_API_URL . "/station/" . $CC_CONFIG['rabbitmq']['user'] . "/suspend";
|
||||||
$user = array('', $CC_CONFIG['apiKey'][0]);
|
$user = array('', $CC_CONFIG['apiKey'][0]);
|
||||||
$data = array('reason' => "Bandwidth limit exceeded");
|
$data = array('reason' => "Bandwidth limit exceeded");
|
||||||
try {
|
try {
|
||||||
$result = Application_Common_HTTPHelper::doPost($url, $user, $data);
|
Application_Common_HTTPHelper::doPost($url, $user, $data);
|
||||||
Logging::info($result);
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue