From 0847ca78706f7309d38e66d9ce3cae9e6643377c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 28 Aug 2020 18:58:15 +0200 Subject: [statistics] Increase auto-delete timeout for old PCs from 1 to 2 years We've had a manual delete function for quite some time now, so automatic deletion is not that important anymore. Set it to two years for now. --- modules-available/statistics/hooks/cron.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules-available') diff --git a/modules-available/statistics/hooks/cron.inc.php b/modules-available/statistics/hooks/cron.inc.php index 8db6b79c..0de233a8 100644 --- a/modules-available/statistics/hooks/cron.inc.php +++ b/modules-available/statistics/hooks/cron.inc.php @@ -65,7 +65,7 @@ if (mt_rand(1, 10) === 1) { } } if (mt_rand(1, 10) === 1) { - Database::exec("DELETE FROM machine WHERE (UNIX_TIMESTAMP() - 86400 * 365) > lastseen"); + Database::exec("DELETE FROM machine WHERE (UNIX_TIMESTAMP() - 86400 * 365 * 2) > lastseen"); if (mt_rand(1, 100) === 1) { Database::exec("OPTIMIZE TABLE machine"); } -- cgit v1.2.3-55-g7522