SAAS-1229 - add comments in Preference and set update timer

This commit is contained in:
Duncan Sommerville 2015-11-23 10:53:25 -05:00
parent f4e6c2dd7a
commit bac1e553d9
2 changed files with 23 additions and 0 deletions

View File

@ -157,6 +157,7 @@ class ApiController extends Zend_Controller_Action
}
}
Application_Model_Preference::incrementBandwidthLimitCounter($usageBytes);
Application_Model_Preference::setBandwidthLimitUpdateTimer();
}
//Used by the SaaS monitoring

View File

@ -1585,6 +1585,14 @@ class Application_Model_Preference
self::setValue("station_podcast_privacy", $value);
}
/**
* Accessors for bandwidth limit counter.
* Tracks bandwidth usage.
*
* @see ApiController::bandwidthUsageAction()
* @see BandwidthLimitTask
*/
public static function getBandwidthLimitCounter() {
return self::getValue("bandwidth_limit_counter");
}
@ -1598,6 +1606,13 @@ class Application_Model_Preference
self::setValue("bandwidth_limit_counter", 0);
}
/**
* Accessors for bandwidth limit reset timer.
* Used to determine when to reset the bandwidth counter for the station.
*
* @see BandwidthLimitTask
*/
public static function getBandwidthLimitResetTimer() {
return self::getValue("bandwidth_limit_reset_timer");
}
@ -1606,6 +1621,13 @@ class Application_Model_Preference
self::setValue("bandwidth_limit_reset_timer", $value);
}
/**
* Accessors for bandwidth limit update timer.
* Used to determine when the bandwidth was last updated for this station.
*
* @see ApiController::bandwidthUsageAction()
*/
public static function getBandwidthLimitUpdateTimer() {
return self::getValue("bandwidth_limit_reset_timer");
}