тип крона git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@54 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2011-06-30 20:41:30 +00:00
commit c4c578a69e
2 changed files with 10 additions and 6 deletions

View file

@ -64,10 +64,14 @@ $bb_cfg['board_disabled_msg'] = 'форум временно отключен';
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";
// Database
$dbhost = 'localhost';
$dbname = 'dbase';
$dbuser = 'user';
$dbpasswd = 'pass';
$dbcharset = 'utf8';
$pconnect = defined('IN_CRON') ? false : false;
$pconnect = false;
$bb_cfg['db']['db1'] = array('localhost', 'dbase', 'user', 'pass', $dbcharset, $pconnect);
$bb_cfg['db']['db1'] = array($dbhost, $dbname, $dbuser, $dbpasswd, $dbcharset, $pconnect);
$bb_cfg['db_alias'] = array(
// 'alias' => 'srv_name'
@ -113,7 +117,7 @@ $bb_cfg['datastore']['sqlite'] = array(
$bb_cfg['datastore']['mc']['srv_all'] = array(
'ds_bb_core',
);
$bb_cfg['datastore']['mc']['srv_loc'] = 'undefined'; // должен быть определен в node_config.php
$bb_cfg['datastore']['mc']['srv_loc'] = 'undefined';
// создание конфига кешей
foreach ($bb_cfg['datastore']['mc']['srv_all'] as $ds_srv)
{
@ -402,8 +406,8 @@ define('CRON_ALLOWED', TRIGGERS_DIR .'cron_allowed');
define('CRON_RUNNING', TRIGGERS_DIR .'cron_running');
// Cron
// старт производится из cron.php
$bb_cfg['cron_check_interval'] = 45; // sec
$bb_cfg['cron_enabled'] = true; // При отвязки крона старт производить из cron.php
$bb_cfg['cron_check_interval'] = 300; // sec
// News
$bb_cfg['show_latest_news'] = true;

View file

@ -615,7 +615,7 @@ switch ($bb_cfg['datastore_type'])
$datastore = new datastore_mysql();
}
// Cron
if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !file_exists(CRON_RUNNING) && defined('START_CRON')) || defined('FORCE_CRON') /* && !empty($_GET['cron_test_9gndjk']) */)
if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !file_exists(CRON_RUNNING) && ($bb_cfg['cron_enabled'] || defined('START_CRON'))) || defined('FORCE_CRON') /* && !empty($_GET['cron_test_9gndjk']) */)
{
if (TIMENOW - $bb_cfg['cron_last_check'] > $bb_cfg['cron_check_interval'])
{