summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBarak Korren <[email protected]>2013-04-02 21:29:10 +0300
committerBarak Korren <[email protected]>2013-04-02 21:29:10 +0300
commit9ef8798bec84b3aa86dc699681ea4f21efb3cefa (patch)
treee6a5195e61b3553e838c3cdb76308f85e39c642f /include
parent58a2577d48790c79adfd44bcfd662c980ce6cfe4 (diff)
No more "tunables.php" defaults dumped into "functions.php"
Diffstat (limited to 'include')
-rw-r--r--include/functions.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/functions.php b/include/functions.php
index d99f6a64b..ee575568a 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -40,16 +40,25 @@
*/
function define_default($name, $value) {
// Note: performence freaks should define everything in
- // tunables.php in config.php becasue if will make defined()
- // run much faster, see 'tris+php at tfconsulting dot com dot
- // au' comment here:
+ // config.php becasue if will make defined() run much faster,
+ // see comment by 'tris+php at tfconsulting dot com dot au'
+ // here:
// http://www.php.net/manual/en/function.defined.php#89886
defined($name) or define($name, $value);
}
- // Require tunables.php to define tunable constants (That may have
- // already been denied in config.php)
- require_once 'tunables.php';
+ ///// Some defaults that you can override in config.php //////
+
+ define_default('FEED_FETCH_TIMEOUT', 45);
+ // How may seconds to wait for response when requesting feed from a site
+ define_default('FEED_FETCH_NO_CACHE_TIMEOUT', 15);
+ // How may seconds to wait for response when requesting feed from a
+ // site when that feed wasn't cached before
+ define_default('FILE_FETCH_TIMEOUT', 45);
+ // Default timeout when fetching files from remote sites
+ define_default('FILE_FETCH_CONNECT_TIMEOUT', 15);
+ // How many seconds to wait for initial response from website when
+ // fetching files from remote sites
if (DB_TYPE == "pgsql") {
define('SUBSTRING_FOR_DATE', 'SUBSTRING_FOR_DATE');