SAAS-1229 - initial work on bandwidth limit within Airtime; overhaul TaskFactory to get tasks reflectively

This commit is contained in:
Duncan Sommerville 2015-11-19 16:08:25 -05:00
parent c328515f4b
commit 6c2d1f008b
4 changed files with 126 additions and 32 deletions

View file

@ -1584,4 +1584,33 @@ class Application_Model_Preference
public static function setStationPodcastPrivacy($value) {
self::setValue("station_podcast_privacy", $value);
}
public static function getBandwidthLimitCounter() {
return self::getValue("bandwidth_limit_counter");
}
public static function incrementBandwidthLimitCounter($value) {
$counter = intval(self::getValue("bandwidth_limit_counter"));
self::setValue("bandwidth_limit_counter", $counter + intval($value));
}
public static function resetBandwidthLimitCounter() {
self::setValue("bandwidth_limit_counter", 0);
}
public static function getBandwidthLimitResetTimer() {
return self::getValue("bandwidth_limit_reset_timer");
}
public static function setBandwidthLimitResetTimer($value) {
self::setValue("bandwidth_limit_reset_timer", $value);
}
public static function getBandwidthLimitUpdateTimer() {
return self::getValue("bandwidth_limit_reset_timer");
}
public static function setBandwidthLimitUpdateTimer() {
self::setValue("bandwidth_limit_reset_timer", microtime(true));
}
}