Anonymous user
User:ImplSearchBot/Code: Difference between revisions
m
ImplSearchBot:0
m (ImplSearchBot:0) |
m (ImplSearchBot:0) |
||
Line 73:
my $starttime = time;
my $pagesedited = 0;
my $categorypulls = 0;
my $cachehits = 0;
# Tracking for svn checkin at end.
# We *should* be the only ones writing to the cache path for now.
# Anyone else should have their own checkout of the data,
# and test runs are done with --cacheonly and --nosvn.
opendir(CACHEDIR, $options{'cachepath'})
or die "Unable to open cache directory";
Line 193 ⟶ 192:
# To add here: Post stats on activities:
# 2. Time last run started
my $runtime = time() - $starttime;
my $statsdata = "Pages edited last run: $pagesedited
&out("Updating stats page. Runtime ($runtime), Pages edited ($pagesedited)\n", 2);
&postpage("User:ImplSearchBot/Stats", $statsdata, "Updating stats data", 0);
Line 400 ⟶ 397:
&out(scalar @$cacheddata . " cache members retrieved from $filename\n", 5);
++$cachehits;
return $cacheddata;
}
Line 418 ⟶ 416:
&out(scalar @$removed . " removed, " . @$added . " added to $categoryname\n", &getloglevelfromdiff(2, $removed, $added));
++$categorypulls;
&cachedata("$categoryname", \@categorycontents);
|