mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
maintenance.php: fix and update logs
This commit is contained in:
parent
c4e3541b15
commit
1e0a95ce83
@ -5,16 +5,21 @@
|
||||
|
||||
require dirname(__FILE__) . '/inc/cli.php';
|
||||
|
||||
echo "Clearing expired bans...";
|
||||
echo "Clearing expired bans...\n";
|
||||
$start = microtime(true);
|
||||
$deleted_count = Bans::purge($config['require_ban_view'], $config['purge_bans']);
|
||||
$delta = microtime(true) - $start;
|
||||
echo "Deleted $deleted_count expired bans in $delta seconds!";
|
||||
modLog("Deleted expired bans in {$delta}s with tools/maintenance.php");
|
||||
echo "Deleted $deleted_count expired bans in $delta seconds!\n";
|
||||
$time_tot = $delta;
|
||||
$deleted_tot = $deleted_count;
|
||||
|
||||
echo "Clearing old antispam...";
|
||||
echo "Clearing old antispam...\n";
|
||||
$start = microtime(true);
|
||||
$deleted_count = purge_old_antispam();
|
||||
$delta = microtime(true) - $start;
|
||||
echo "Deleted $deleted_count expired antispam in $delta seconds!";
|
||||
modLog("Deleted expired antispam in {$delta}s with tools/maintenance.php");
|
||||
echo "Deleted $deleted_count expired antispam in $delta seconds!\n";
|
||||
$time_tot = $delta;
|
||||
$deleted_tot = $deleted_count;
|
||||
|
||||
$time_tot = number_format((float)$time_tot, 4, '.', '');
|
||||
modLog("Deleted $deleted_tot expired entries in {$time_tot}s with maintenance tool");
|
||||
|
Loading…
Reference in New Issue
Block a user