summaryrefslogtreecommitdiff
path: root/lib/Multi/Maintenance.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-04-08 19:25:53 +0200
committerYorhel <git@yorhel.nl>2011-04-08 19:25:53 +0200
commit9304d1032723d3c2b9f3dad4d239f12c8c7268fa (patch)
tree6f6b356adc2a0b74e7a2c0832773a9295e3ab0a8 /lib/Multi/Maintenance.pm
parent50da6516a687442f09a05416ca1daff04d7bbf37 (diff)
Update traits_chars cache daily using Multi::Maintenance
I'd really prefer incremental updates, but I'll first need to find a proper algorithm...
Diffstat (limited to 'lib/Multi/Maintenance.pm')
-rw-r--r--lib/Multi/Maintenance.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm
index 44cb6552..fb0c336f 100644
--- a/lib/Multi/Maintenance.pm
+++ b/lib/Multi/Maintenance.pm
@@ -18,13 +18,13 @@ sub spawn {
package_states => [
$p => [qw|
_start shutdown set_daily daily set_monthly monthly log_stats
- vncache_inc tagcache vnpopularity vnrating cleangraphs cleansessions cleannotifications
+ vncache_inc tagcache traitcache vnpopularity vnrating cleangraphs cleansessions cleannotifications
vncache_full usercache statscache logrotate
vnsearch_check vnsearch_gettitles vnsearch_update
|],
],
heap => {
- daily => [qw|vncache_inc tagcache vnpopularity vnrating cleangraphs cleansessions cleannotifications|],
+ daily => [qw|vncache_inc tagcache traitcache vnpopularity vnrating cleangraphs cleansessions cleannotifications|],
monthly => [qw|vncache_full usercache statscache logrotate|],
vnsearch_checkdelay => 3600,
@_,
@@ -121,13 +121,19 @@ sub vncache_inc {
sub tagcache {
- # takes about 2 seconds max, still OK
+ # takes about 5 seconds max, still OK
$_[KERNEL]->post(pg => do => 'SELECT tag_vn_calc()', undef, 'log_stats', 'tagcache');
}
+sub traitcache {
+ # still takes less than a second
+ $_[KERNEL]->post(pg => do => 'SELECT traits_chars_calc()', undef, 'log_stats', 'traitcache');
+}
+
+
sub vnpopularity {
- # still takes at most 3 seconds. let's hope that doesn't increase...
+ # takes a bit more than 8 seconds, meh...
$_[KERNEL]->post(pg => do => 'SELECT update_vnpopularity()', undef, 'log_stats', 'vnpopularity');
}