Closed (fixed)
Project:
Drupal.org customizations
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
6 Oct 2010 at 20:57 UTC
Updated:
23 May 2014 at 18:23 UTC
Jump to comment: Most recent
The home page stats, built by the get_activity drupalorg method, are extremely nasty queries. They should not be loaded by user traffic to prevent a poor user experience and the possibility of a stampede. Below is a small patch to add a drush command to rebuild these stats via cron:
=== modified file 'sites/all/modules/drupalorg/drupalorg/drupalorg.drush.inc'
--- sites/all/modules/drupalorg/drupalorg/drupalorg.drush.inc 2010-09-28 03:27:13 +0000
+++ sites/all/modules/drupalorg/drupalorg/drupalorg.drush.inc 2010-10-06 20:54:58 +0000
@@ -4,6 +4,8 @@
switch ($section) {
case 'drupalorg:map-content':
return dt('Update home page map pins.');
+ case 'drupalorg:rebuild-stats':
+ return dt('Update home page stats.');
}
}
@@ -12,9 +14,17 @@
'map-content' => array(
'description' => 'Update home page map pins.',
),
+ 'rebuild-stats' => array(
+ 'description' => 'Update home page stats.',
+ ),
);
}
function drush_drupalorg_map_content() {
drupalorg_map_content(TRUE);
}
+
+function drush_drupalorg_rebuild_stats() {
+ drupalorg_get_activity(TRUE);
+}
+
Comments
Comment #1
nnewton commentedCommitted
http://drupal.org/cvs?commit=432506