delinquent_files/demon.php

changeset 3
24d8f83459b3
parent 2
cd58c0bc21d6
child 6
8b4e205ffc94
--- a/delinquent_files/demon.php	Mon Jan 23 21:42:29 2023 +0100
+++ b/delinquent_files/demon.php	Mon Jan 23 22:02:35 2023 +0100
@@ -1,7 +1,4 @@
 #!/usr/bin/php
-# $Id$
-#
-
 <?PHP
 
 chdir ( '/data/project/commons-delinquent' ) ;
@@ -157,6 +154,7 @@
 
 	function getTextFromWiki ( $wiki , $pagename ) {
 		$ret = false ;
+		$this->d->debug( "Getting api of " . $wiki) ;
 		$api = $this->getAPI ( $wiki ) ;
 		if ( $api ) {
 			$services = new \Mediawiki\Api\MediawikiFactory( $api );
@@ -506,7 +504,7 @@
 
 		$last_wiki = '' ;
 		foreach ( $edits AS $o ) {
-			if ( $last_wiki == $o->wiki ) sleep ( 5 ) ; // Edit rate limiter
+			if ( $last_wiki == $o->wiki ) sleep ( 2 ) ; // Edit rate limiter
 			$this->d->debug("Perform an edit in $o->wiki");
 			try {
 				$this->performEdit ( $o ) ;

mercurial