diff options
Diffstat (limited to 'lib/Multi')
-rw-r--r-- | lib/Multi/Maintenance.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm index 864239dd..be267aba 100644 --- a/lib/Multi/Maintenance.pm +++ b/lib/Multi/Maintenance.pm @@ -17,12 +17,12 @@ sub spawn { package_states => [ $p => [qw| _start shutdown set_daily daily set_monthly monthly log_stats - vncache_inc tagcache vnpopularity vnrating cleangraphs + vncache_inc tagcache vnpopularity vnrating cleangraphs cleansessions vncache_full usercache statscache logrotate |], ], heap => { - daily => [qw|vncache_inc tagcache vnpopularity vnrating cleangraphs|], + daily => [qw|vncache_inc tagcache vnpopularity vnrating cleangraphs cleansessions|], monthly => [qw|vncache_full usercache statscache logrotate|], @_, }, @@ -151,6 +151,13 @@ sub cleangraphs { } +sub cleansessions { + $_[KERNEL]->post(pg => do => + q|DELETE FROM sessions WHERE lastused < NOW()-'1 month'::interval|, + undef, 'log_stats', 'cleansessions'); +} + + # # M O N T H L Y J O B S # |