API: Optionally include in job queue size in maxlag
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index d158c1e..53a147b 100644 (file)
@@ -7394,6 +7394,19 @@ $wgJobQueueAggregator = [
        'class' => 'JobQueueAggregatorNull'
 ];
 
+/**
+ * Whether to include the number of jobs that are queued
+ * for the API's maxlag parameter.
+ * The total number of jobs will be divided by this to get an
+ * estimated second of maxlag. Typically bots backoff at maxlag=5,
+ * so setting this to the max number of jobs that should be in your
+ * queue divided by 5 should have the effect of stopping bots once
+ * that limit is hit.
+ *
+ * @since 1.29
+ */
+$wgJobQueueIncludeInMaxLagFactor = false;
+
 /**
  * Additional functions to be performed with updateSpecialPages.
  * Expensive Querypages are already updated.