mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Broken announcer fix, announcer debug removed.
This commit is contained in:
parent
78b8a38e73
commit
9aba4d0d59
11 changed files with 9 additions and 109 deletions
|
@ -37,45 +37,18 @@ if ($bb_cfg['tracker']['off']) {
|
|||
//
|
||||
// Functions
|
||||
//
|
||||
function tracker_exit()
|
||||
{
|
||||
global $DBS;
|
||||
|
||||
if (DBG_LOG && DBG_TRACKER) {
|
||||
if ($gen_time = utime() - TIMESTART) {
|
||||
$sql_init_perc = round($DBS->sql_inittime * 100 / $gen_time);
|
||||
$sql_total_perc = round($DBS->sql_timetotal * 100 / $gen_time);
|
||||
|
||||
$str = array();
|
||||
$str[] = substr(TIMENOW, -4, 4);
|
||||
$str[] = sprintf('%.4f', $gen_time);
|
||||
$str[] = sprintf('%.4f' . LOG_SEPR . '%02d%%', $DBS->sql_inittime, $sql_init_perc);
|
||||
$str[] = sprintf('%.4f' . LOG_SEPR . '%02d%%', $DBS->sql_timetotal, $sql_total_perc);
|
||||
$str[] = $DBS->num_queries;
|
||||
$str[] = sprintf('%.1f', sys('la'));
|
||||
$str = implode(LOG_SEPR, $str) . LOG_LF;
|
||||
dbg_log($str, '!!gentime');
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
function silent_exit()
|
||||
{
|
||||
ob_end_clean();
|
||||
|
||||
tracker_exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
function error_exit($msg = '')
|
||||
{
|
||||
if (DBG_LOG) {
|
||||
dbg_log(' ', '!err-' . clean_filename($msg));
|
||||
}
|
||||
|
||||
silent_exit();
|
||||
|
||||
echo \Rych\Bencode\Bencode::encode(['failure reason' => str_compact($msg)]);
|
||||
|
||||
tracker_exit();
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue