Manybubbles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/129177

Change subject: When testing force job updates on page views
......................................................................

When testing force job updates on page views

Cirrus relies on delayed jobs and by default those are only checked every
5 minutes or so.  This checks them on every page view in the testing config.
This allows our tests to run much more quickly.

Change-Id: I81f2c37a1962d46643965d3706580d961701dca3
---
M tests/jenkins/Jenkins.php
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/77/129177/1

diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php
index 7a839fc..cdaf3a4 100644
--- a/tests/jenkins/Jenkins.php
+++ b/tests/jenkins/Jenkins.php
@@ -1,6 +1,8 @@
 <?php
 namespace CirrusSearch\Jenkins;
 
+use \JobQueueGroup;
+
 /**
  * Sets up configuration required to run the browser tests on Jenkins.
  *
@@ -33,6 +35,8 @@
 $wgAutoloadClasses[ 'CirrusSearch\Jenkins\CleanSetup' ] = __DIR__ . 
'/cleanSetup.php';
 $wgAutoloadClasses[ 'CirrusSearch\Jenkins\NukeAllIndexes' ] = __DIR__ . 
'/nukeAllIndexes.php';
 $wgHooks[ 'LoadExtensionSchemaUpdates' ][] = 
'CirrusSearch\Jenkins\Jenkins::installDatabaseUpdatePostActions';
+$wgHooks[ 'BeforeInitialize' ][] = 
'CirrusSearch\Jenkins\Jenkins::recyclePruneAndUndelayJobs';
+
 
 // Dependencies
 // Jenkins will automatically load these for us but it makes this file more 
generally useful
@@ -45,6 +49,8 @@
 
 // Configuration
 $wgSearchType = 'CirrusSearch';
+$wgCirrusSearchUseExperimentalHighlighter = true;
+$wgCirrusSearchOptimizeIndexForExperimentalHighlighter = true;
 $wgOggThumbLocation = '/usr/bin/oggThumb';
 $wgGroupPermissions[ '*' ][ 'deleterevision' ] = true;
 $wgFileExtensions[] = 'pdf';
@@ -56,7 +62,6 @@
        'order' => 'fifo',
        'redisServer' => 'localhost',
        'checkDelay' => true,
-       'maximumPeriodicTaskSeconds' => 1,
        'redisConfig' => array(
                'password' => $wgRedisPassword,
        ),
@@ -89,4 +94,11 @@
                $updater->addPostDatabaseUpdateMaintenance( 
'CirrusSearch\Jenkins\CleanSetup');
                return true;
        }
+
+       public static function recyclePruneAndUndelayJobs( $special, $subpage ) 
{
+               $jobQueue = JobQueueGroup::singleton()->get( 
'cirrusSearchLinksUpdateSecondary' );
+               if ( $jobQueue ) {
+                       $jobQueue->recyclePruneAndUndelayJobs();
+               }
+       }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/129177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81f2c37a1962d46643965d3706580d961701dca3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to