Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/397536 )
Change subject: dispatchChanges add dispatchNullRuns config option ...................................................................... dispatchChanges add dispatchNullRuns config option This config option allows the dispatchChanges script to actually do nothing while still being run. This enables us to temporarily stop the dispatching without having to remove a cron. This will be used when switching the lockmanager over on wikidata.org where we should stop dispatching, switch lock managers and then re enable dispatching. Change-Id: I523a9f79422a6da538038e4634c249412b623fe6 --- M repo/config/Wikibase.default.php M repo/maintenance/dispatchChanges.php 2 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/36/397536/1 diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php index 495294d..bad20d9 100644 --- a/repo/config/Wikibase.default.php +++ b/repo/config/Wikibase.default.php @@ -49,6 +49,7 @@ 'localClientDatabases' => [], // Settings for change dispatching + 'dispatchNullRuns' => false, 'dispatchBatchChunkFactor' => 3, 'dispatchBatchCacheFactor' => 3, 'dispatchDefaultBatchSize' => 1000, diff --git a/repo/maintenance/dispatchChanges.php b/repo/maintenance/dispatchChanges.php index 1d50023..a940109 100644 --- a/repo/maintenance/dispatchChanges.php +++ b/repo/maintenance/dispatchChanges.php @@ -219,12 +219,16 @@ throw new MWException( "WikibaseLib has not been loaded." ); } + $wikibaseRepo = WikibaseRepo::getDefaultInstance(); + + if ( $wikibaseRepo->getSettings()->getSetting( 'dispatchNullRuns' ) ) { + $this->log( "Done, null runs are enabled so exiting early." ); + } + $maxTime = (int)$this->getOption( 'max-time', PHP_INT_MAX ); $maxPasses = (int)$this->getOption( 'max-passes', $maxTime < PHP_INT_MAX ? PHP_INT_MAX : 1 ); $delay = (int)$this->getOption( 'idle-delay', 10 ); $selectedClients = $this->getOption( 'client' ); - - $wikibaseRepo = WikibaseRepo::getDefaultInstance(); $clientWikis = $this->getClientWikis( $wikibaseRepo->getSettings()->getSetting( 'localClientDatabases' ) -- To view, visit https://gerrit.wikimedia.org/r/397536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I523a9f79422a6da538038e4634c249412b623fe6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits