mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Updated
This commit is contained in:
parent
2b874ff183
commit
f5227b4083
24 changed files with 26 additions and 24 deletions
|
@ -46,6 +46,7 @@ foreach ($cron_jobs as $job) {
|
||||||
if (is_file($job_script)) {
|
if (is_file($job_script)) {
|
||||||
$cron_start_time = utime();
|
$cron_start_time = utime();
|
||||||
$cron_runtime_log = [];
|
$cron_runtime_log = [];
|
||||||
|
$cronjob_completed = false;
|
||||||
$cron_write_log = (CRON_LOG_ENABLED && (CRON_FORCE_LOG || $job['log_enabled'] >= 1));
|
$cron_write_log = (CRON_LOG_ENABLED && (CRON_FORCE_LOG || $job['log_enabled'] >= 1));
|
||||||
$cron_sql_log_file = CRON_LOG_DIR . '/SQL-' . basename($job['cron_script']);
|
$cron_sql_log_file = CRON_LOG_DIR . '/SQL-' . basename($job['cron_script']);
|
||||||
|
|
||||||
|
@ -90,7 +91,7 @@ foreach ($cron_jobs as $job) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('CRONJOB_COMPLETED') || !CRONJOB_COMPLETED) {
|
if (!$cronjob_completed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,4 +213,4 @@ DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl");
|
||||||
unset($fix_errors, $debug_mode);
|
unset($fix_errors, $debug_mode);
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -66,4 +66,4 @@ $datastore->update('check_updates');
|
||||||
$datastore->update('files_integrity');
|
$datastore->update('files_integrity');
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -85,4 +85,4 @@ DB()->query("
|
||||||
");
|
");
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -18,4 +18,4 @@ if ($log_days_keep !== 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -40,4 +40,4 @@ if ($pm_days_keep !== 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -19,4 +19,4 @@ DB()->query("
|
||||||
");
|
");
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -44,4 +44,4 @@ foreach (file($dump_path) as $line) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -14,4 +14,4 @@ if (!defined('BB_ROOT')) {
|
||||||
$datastore->update('cat_forums');
|
$datastore->update('cat_forums');
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -14,4 +14,4 @@ if (!defined('BB_ROOT')) {
|
||||||
$datastore->update('stats');
|
$datastore->update('stats');
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -35,4 +35,4 @@ DB()->query("DELETE buf FROM " . BUF_TOPIC_VIEW . " buf");
|
||||||
DB()->unlock();
|
DB()->unlock();
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -20,4 +20,4 @@ if ($bb_cfg['prune_enable']) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -55,4 +55,4 @@ while (true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -22,4 +22,4 @@ if ($bb_cfg['topic_moved_days_keep']) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -54,4 +54,4 @@ DB()->query("
|
||||||
");
|
");
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -23,4 +23,4 @@ if (is_file(SITEMAP_DIR . '/sitemap.xml')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -160,4 +160,4 @@ DB()->query("
|
||||||
DB()->query("DROP TABLE IF EXISTS " . NEW_BB_BT_LAST_USERSTAT . ", " . OLD_BB_BT_LAST_USERSTAT);
|
DB()->query("DROP TABLE IF EXISTS " . NEW_BB_BT_LAST_USERSTAT . ", " . OLD_BB_BT_LAST_USERSTAT);
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -66,4 +66,4 @@ if ($bb_cfg['ocelot']['enabled']) {
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -62,4 +62,4 @@ if ($dead_tor_sql && $attach_sql) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -193,4 +193,4 @@ if ($bb_cfg['torhelp_enabled']) {
|
||||||
DB()->expect_slow_query(10);
|
DB()->expect_slow_query(10);
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -71,4 +71,4 @@ if ($bb_cfg['seed_bonus_enabled'] && $bb_cfg['seed_bonus_points'] && $bb_cfg['se
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -25,4 +25,4 @@ DB()->query("
|
||||||
DB()->query("TRUNCATE TABLE " . BUF_LAST_SEEDER);
|
DB()->query("TRUNCATE TABLE " . BUF_LAST_SEEDER);
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -35,4 +35,4 @@ foreach ($forums_data as $forum_data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cron completed
|
// Cron completed
|
||||||
define('CRONJOB_COMPLETED', true);
|
$cronjob_completed = true;
|
||||||
|
|
|
@ -32,13 +32,14 @@ class Cron
|
||||||
bb_die('Could not obtain cron script');
|
bb_die('Could not obtain cron script');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cronjob_completed = false;
|
||||||
while ($row = DB()->sql_fetchrow($result)) {
|
while ($row = DB()->sql_fetchrow($result)) {
|
||||||
$job = $row['cron_script'];
|
$job = $row['cron_script'];
|
||||||
$job_script = INC_DIR . '/cron/jobs/' . $job;
|
$job_script = INC_DIR . '/cron/jobs/' . $job;
|
||||||
require($job_script);
|
require($job_script);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('CRONJOB_COMPLETED') || !CRONJOB_COMPLETED) {
|
if (!$cronjob_completed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue