Merge "User: Avoid deprecated Linker::link()"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueGroup.php
index 71d68d9..ef0ecb3 100644 (file)
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @author Aaron Schulz
  */
 
 /**
@@ -163,14 +162,16 @@ class JobQueueGroup {
        /**
         * Buffer jobs for insertion via push() or call it now if in CLI mode
         *
-        * Note that MediaWiki::restInPeace() calls pushLazyJobs()
+        * Note that pushLazyJobs() is registered as a deferred update just before
+        * DeferredUpdates::doUpdates() in MediaWiki and JobRunner classes in order
+        * to be executed as the very last deferred update (T100085, T154425).
         *
         * @param IJobSpecification|IJobSpecification[] $jobs A single Job or a list of Jobs
         * @return void
         * @since 1.26
         */
        public function lazyPush( $jobs ) {
-               if ( PHP_SAPI === 'cli' ) {
+               if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) {
                        $this->push( $jobs );
                        return;
                }