Content deleted Content added
Updating published sources: ArticleCreationGrapher: * Add separate thumbnail size setting. * Fix "nextrun" logic. * Add the ability to label events at the top of the graph. |
Updating published sources: ArticleCreationGrapher: * Approved! * Add in correct halting and timesharing logic. |
||
Line 1:
{{ombox|type=notice|text=
<source lang="perl">
package tasks::ArticleCreationGrapher;
Line 10:
Task: ArticleCreationGrapher
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 41
Status:
Created: 2010-08-25
Line 58:
=for info
=cut
sub approved {
return
}
Line 76:
foreach my $page (@pages){
return 0 if $api->halting;
my $pgdata=$api->store->{$page->{'page'}} // {
nextrun => 0,
Line 107 ⟶ 108:
my $ct=0;
foreach my $p (@pageids) {
return 0 if $api->halting;
if(exists($pgdata->{'pages'}{$p})){
push @px, $p;
Line 149 ⟶ 151:
ts=>$ts,
};
return 0 if(time>$endtime);
}
$api->store->{$page->{'page'}}=$pgdata;
Line 315 ⟶ 318:
}
}
return 0 if(time>$endtime);
}
# No more pages to check, try again
foreach my $page (@pages){
my $pgdata=$api->store->{$page->{'page'}};
$t=$pgdata->{'nextrun'} if(!defined($t) || $t>$pgdata->{'nextrun'});
}
return $t-time();
}
|