mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -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)) {
|
||||
$cron_start_time = utime();
|
||||
$cron_runtime_log = [];
|
||||
$cronjob_completed = false;
|
||||
$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']);
|
||||
|
||||
|
@ -90,7 +91,7 @@ foreach ($cron_jobs as $job) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!defined('CRONJOB_COMPLETED') || !CRONJOB_COMPLETED) {
|
||||
if (!$cronjob_completed) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,4 +213,4 @@ DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl");
|
|||
unset($fix_errors, $debug_mode);
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -66,4 +66,4 @@ $datastore->update('check_updates');
|
|||
$datastore->update('files_integrity');
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -85,4 +85,4 @@ DB()->query("
|
|||
");
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -18,4 +18,4 @@ if ($log_days_keep !== 0) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -40,4 +40,4 @@ if ($pm_days_keep !== 0) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -19,4 +19,4 @@ DB()->query("
|
|||
");
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -44,4 +44,4 @@ foreach (file($dump_path) as $line) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -14,4 +14,4 @@ if (!defined('BB_ROOT')) {
|
|||
$datastore->update('cat_forums');
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -14,4 +14,4 @@ if (!defined('BB_ROOT')) {
|
|||
$datastore->update('stats');
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -35,4 +35,4 @@ DB()->query("DELETE buf FROM " . BUF_TOPIC_VIEW . " buf");
|
|||
DB()->unlock();
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -20,4 +20,4 @@ if ($bb_cfg['prune_enable']) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -55,4 +55,4 @@ while (true) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -22,4 +22,4 @@ if ($bb_cfg['topic_moved_days_keep']) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -54,4 +54,4 @@ DB()->query("
|
|||
");
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -23,4 +23,4 @@ if (is_file(SITEMAP_DIR . '/sitemap.xml')) {
|
|||
}
|
||||
|
||||
// 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);
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -66,4 +66,4 @@ if ($bb_cfg['ocelot']['enabled']) {
|
|||
}*/
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -62,4 +62,4 @@ if ($dead_tor_sql && $attach_sql) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -193,4 +193,4 @@ if ($bb_cfg['torhelp_enabled']) {
|
|||
DB()->expect_slow_query(10);
|
||||
|
||||
// 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
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -25,4 +25,4 @@ DB()->query("
|
|||
DB()->query("TRUNCATE TABLE " . BUF_LAST_SEEDER);
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -35,4 +35,4 @@ foreach ($forums_data as $forum_data) {
|
|||
}
|
||||
|
||||
// Cron completed
|
||||
define('CRONJOB_COMPLETED', true);
|
||||
$cronjob_completed = true;
|
||||
|
|
|
@ -32,13 +32,14 @@ class Cron
|
|||
bb_die('Could not obtain cron script');
|
||||
}
|
||||
|
||||
$cronjob_completed = false;
|
||||
while ($row = DB()->sql_fetchrow($result)) {
|
||||
$job = $row['cron_script'];
|
||||
$job_script = INC_DIR . '/cron/jobs/' . $job;
|
||||
require($job_script);
|
||||
}
|
||||
|
||||
if (!defined('CRONJOB_COMPLETED') || !CRONJOB_COMPLETED) {
|
||||
if (!$cronjob_completed) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue