jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/397535 )
Change subject: dispatchChanges allow configuration instead of params
......................................................................
dispatchChanges allow configuration instead of params
This means defaults for dispatchChanges can be controlled
by mediawiki config vars instead of passing in params
to the maint script itslef.
The result of this is within the WMF setup we can run the maint
script with no parameters in operations-puppet and fine tune
the configuration options ourself within mediawiki-config.
Change-Id: If24dd730de6c3bfbf0e47742c447e6da1084db12
---
M docs/options.wiki
M repo/config/Wikibase.default.php
M repo/maintenance/dispatchChanges.php
3 files changed, 24 insertions(+), 4 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/options.wiki b/docs/options.wiki
index fee5d1e..0cead20 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -48,6 +48,10 @@
=== Expert Settings ===
;dispatchBatchChunkFactor: Chunk factor used internally by the
<code>dispatchChanges.php</code> script. The default is 3. If most clients are
not interested in most changes, this factor can be raised to lower the number
of database queries needed to fetch a batch of changes.
+;dispatchDefaultBatchSize: Overrides the default value for batch-size in
dispatchChanges.php
+;dispatchDefaultMaxChunks: Overrides the default value for max-chunks in
dispatchChanges.php
+;dispatchDefaultDispatchInterval: Overrides the default value for
dispatch-interval in dispatchChanges.php
+;dispatchDefaultDispatchRandomness: Overrides the default value for randomness
in dispatchChanges.php
;idBlacklist: A list of IDs to reserve and skip for new entities. IDs are
given as integers, the blacklist applies to all types of entities.
:'''Note:''' This may change in the future to allow separate blacklists for
different kinds of entities.
;multilang-limits: Limits to impose on multilanguage strings like labels,
descriptions and such. Supported limits:
diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index c2f7c2d..7916a7b 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -51,6 +51,10 @@
// Settings for change dispatching
'dispatchBatchChunkFactor' => 3,
'dispatchBatchCacheFactor' => 3,
+ 'dispatchDefaultBatchSize' => 1000,
+ 'dispatchDefaultMaxChunks' => 15,
+ 'dispatchDefaultDispatchInterval' => 60,
+ 'dispatchDefaultDispatchRandomness' => 15,
// Formats that shall be available via SpecialEntityData.
// The first format will be used as the default.
diff --git a/repo/maintenance/dispatchChanges.php
b/repo/maintenance/dispatchChanges.php
index 0f88637..3ae5bbd 100644
--- a/repo/maintenance/dispatchChanges.php
+++ b/repo/maintenance/dispatchChanges.php
@@ -149,10 +149,22 @@
$batchChunkFactor = $settings->getSetting(
'dispatchBatchChunkFactor' );
$batchCacheFactor = $settings->getSetting(
'dispatchBatchCacheFactor' );
- $batchSize = (int)$this->getOption( 'batch-size', 1000 );
- $maxChunks = (int)$this->getOption( 'max-chunks', 15 );
- $dispatchInterval = (int)$this->getOption( 'dispatch-interval',
60 );
- $randomness = (int)$this->getOption( 'randomness', 15 );
+ $batchSize = (int)$this->getOption(
+ 'batch-size',
+ $settings->getSetting( 'dispatchDefaultBatchSize' )
+ );
+ $maxChunks = (int)$this->getOption(
+ 'max-chunks',
+ $settings->getSetting( 'dispatchDefaultMaxChunks' )
+ );
+ $dispatchInterval = (int)$this->getOption(
+ 'dispatch-interval',
+ $settings->getSetting(
'dispatchDefaultDispatchInterval' )
+ );
+ $randomness = (int)$this->getOption(
+ 'randomness',
+ $settings->getSetting(
'dispatchDefaultDispatchRandomness' )
+ );
$this->verbose = $this->getOption( 'verbose', false );
--
To view, visit https://gerrit.wikimedia.org/r/397535
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If24dd730de6c3bfbf0e47742c447e6da1084db12
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Thiemo Kreuz (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits