diff options
Diffstat (limited to 'modules-available/syslog/hooks/cron.inc.php')
-rw-r--r-- | modules-available/syslog/hooks/cron.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/syslog/hooks/cron.inc.php b/modules-available/syslog/hooks/cron.inc.php index c796675f..bae882a9 100644 --- a/modules-available/syslog/hooks/cron.inc.php +++ b/modules-available/syslog/hooks/cron.inc.php @@ -1,5 +1,8 @@ <?php if (mt_rand(1, 10) === 1) { - Database::exec("DELETE FROM clientlog WHERE (UNIX_TIMESTAMP() - dateline) > 86400 * 190"); + Database::exec("DELETE FROM clientlog WHERE (UNIX_TIMESTAMP() - 86400 * 190) > dateline"); + if (mt_rand(1, 100) === 1) { + Database::exec("OPTIMIZE TABLE clientlog"); + } }
\ No newline at end of file |