User:AnomieBOT/source/tasks/WatchlistUpdater.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: SourceUploader: * BUGFIX: Just don't allow lines to wrap in the embedded notices, for some reason it breaks when rendered.
AnomieBOT (talk | contribs)
Updating published sources: General: * Change 'shutoff' to be checked whenever an edit token is requested, by piggybacking on the edittoken request. SourceUploader: * BUGFIX: Add a subst so the history template works right
Line 38:
$api->read_throttle(6);
$api->edit_throttle(10);
return 300 if $self->check_shutoff($api, 'WatchlistUpdater');
 
if(!exists($self->{'lastrun'})){
Line 70 ⟶ 69:
my $starttime=strftime("%d %b %Y %T", gmtime());
my $tok=$api->edittoken($k);
if($tok->{'code'} eq 'shutoff'){
$self->warn("Task disabled: ".$tok->{'content'}."\n");
return 300;
}
if($tok->{'code'} ne 'success'){
$self->warn("Failed to retrieve edit token for $k: ".$tok->{'error'});