Mon, 23 Jan 2023 22:02:35 +0100
demon.php: Add API debug output, lower speel delay
delinquent_files/demon.php | file | annotate | diff | comparison | revisions |
--- 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 ) ;