CC-3464: Playout forward cache should be configurable
-Done
This commit is contained in:
parent
73eb691be2
commit
9be6f1bd0e
3 changed files with 17 additions and 1 deletions
|
@ -62,6 +62,8 @@ 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['cache_ahead_hours'] = $values['general']['cache_ahead_hours'];
|
||||||
|
|
||||||
// Database config
|
// Database config
|
||||||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||||
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||||
|
|
|
@ -609,7 +609,17 @@ class Application_Model_Schedule {
|
||||||
}
|
}
|
||||||
if (is_null($p_fromDateTime)) {
|
if (is_null($p_fromDateTime)) {
|
||||||
$t2 = new DateTime("@".time());
|
$t2 = new DateTime("@".time());
|
||||||
$t2->add(new DateInterval("PT30M"));
|
|
||||||
|
$cache_ahead_hours = $CC_CONFIG["cache_ahead_hours"];
|
||||||
|
|
||||||
|
if (is_numeric($cache_ahead_hours)){
|
||||||
|
//make sure we are not dealing with a float
|
||||||
|
$cache_ahead_hours = intval($cache_ahead_hours);
|
||||||
|
} else {
|
||||||
|
$cache_ahead_hours = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$t2->add(new DateInterval("PT".$cache_ahead_hours."H"));
|
||||||
$range_end = $t2->format("Y-m-d H:i:s");
|
$range_end = $t2->format("Y-m-d H:i:s");
|
||||||
} else {
|
} else {
|
||||||
$range_end = Application_Model_Schedule::PypoTimeToAirtimeTime($p_toDateTime);
|
$range_end = Application_Model_Schedule::PypoTimeToAirtimeTime($p_toDateTime);
|
||||||
|
|
|
@ -18,6 +18,10 @@ airtime_dir = x
|
||||||
base_url = localhost
|
base_url = localhost
|
||||||
base_port = 80
|
base_port = 80
|
||||||
|
|
||||||
|
#How many hours ahead of time should Airtime playout engine (PYPO)
|
||||||
|
#cache scheduled media files.
|
||||||
|
cache_ahead_hours = 1
|
||||||
|
|
||||||
[soundcloud]
|
[soundcloud]
|
||||||
connection_retries = 3
|
connection_retries = 3
|
||||||
time_between_retries = 60
|
time_between_retries = 60
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue