wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r22429: LJSUP-12931: Add clean logging table

Committer: wisest-owl
LJSUP-12931: Add clean logging table

U   trunk/bin/maint/clean_caches.pl
Modified: trunk/bin/maint/clean_caches.pl
===================================================================
--- trunk/bin/maint/clean_caches.pl	2012-07-12 09:02:26 UTC (rev 22428)
+++ trunk/bin/maint/clean_caches.pl	2012-07-12 11:29:59 UTC (rev 22429)
@@ -20,6 +20,9 @@
     print "-I- Cleaning commenturl.\n";
     $dbh->do("DELETE FROM commenturls WHERE timecreate < UNIX_TIMESTAMP() - 86400*30 LIMIT 50000");
 
+    print "-I- Cleaning syslog table.\n";
+    $dbh->do("DELETE FROM syslog WHERE log_time < UNIX_TIMESTAMP() - 86400 * 30 * 2");  ## 2 months
+
     if ($LJ::COPPA_CHECK && $LJ::UNIQ_COOKIES) {
         print "-I- Cleaning underage uniqs.\n";
         $dbh->do("DELETE FROM underage WHERE timeof < (UNIX_TIMESTAMP() - 86400*90) LIMIT 2000");

Tags: livejournal, pl, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments