From bac1e553d926f8a85a8975b888c536ab77c6ec08 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Mon, 23 Nov 2015 10:53:25 -0500 Subject: [PATCH] SAAS-1229 - add comments in Preference and set update timer --- .../application/controllers/ApiController.php | 1 + airtime_mvc/application/models/Preference.php | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 41d6a5c9b..40e73923d 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -157,6 +157,7 @@ class ApiController extends Zend_Controller_Action } } Application_Model_Preference::incrementBandwidthLimitCounter($usageBytes); + Application_Model_Preference::setBandwidthLimitUpdateTimer(); } //Used by the SaaS monitoring diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 68d790249..049b0a17a 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -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"); }