Use AutoCommitUpdate instead of Database->onTransactionIdle
[lhc/web/wiklou.git] / includes / MediaWiki.php
index a7214c7..2125c23 100644 (file)
@@ -898,12 +898,13 @@ class MediaWiki {
                        __METHOD__
                );
 
+               // Push lazilly-pushed jobs
+               // Important: this must be the last deferred update added (T100085, T154425)
+               DeferredUpdates::addCallableUpdate( [ 'JobQueueGroup', 'pushLazyJobs' ] );
+
                // Do any deferred jobs
                DeferredUpdates::doUpdates( 'enqueue' );
 
-               // Make sure any lazy jobs are pushed
-               JobQueueGroup::pushLazyJobs();
-
                // Now that everything specific to this request is done,
                // try to occasionally run jobs (if enabled) from the queues
                if ( $mode === 'normal' ) {