Got Hits!

So the problem was counthits.pl uses counthits_lastmaxid

my $logdb = getObject('Slash::DB', { db_type => "log_slave" });
my $lastmaxid = ($slashdb->getVar('counthits_lastmaxid', 'value', 1) || 0) + 1;
my $newmaxid = $logdb->sqlSelect("MAX(id)", "accesslog");
$lastmaxid = $newmaxid - $maxrows if $lastmaxid < $newmaxid - $maxrows;
if ($lastmaxid > $newmaxid) {
slashdLog("Nothing to do, lastmaxid '$lastmaxid', newmaxid '$newmaxid'");
return "";
}

SO since I dropped, well, cleaned out accesslog, lastmaxid was way too high, so it thought it didn't need to do anything, so, as you can see, all I needed to do was fix counthits_lastmaxid, and poof, got hits. I just set counthits_lastmaxid = 1, maybe not the best thing to do, but I think that'll catch everything we missed.

Tue Jun 8 01:13:02 2004 [counthits.pl] begin (14566)
Tue Jun 8 01:14:30 2004 [counthits.pl] 2643 of 2658 sids updated for 10739 more hits in 87.43 secs: misc=0.00 select=0.41 sleep=78.72 update=8.29
Tue Jun 8 01:14:30 2004 [counthits.pl] end (89.45s): 2643 of 2658 sids updated for 10739 more hits in 87.43 secs:

Seems about right.
Geekiest post ever.

Subscribe to Comments for "Got Hits!"