Prefer that enqueueable post-send updates are run immediately
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Sep 2017 08:07:38 +0000 (10:07 +0200)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Sep 2017 08:21:16 +0000 (10:21 +0200)
commit9ae936b197eab3c65103abf55255cd9e918f0a9b
treec33aa0e03e6501e4d8438b83a2fe3aceec6aa1de
parent655931210678d0090cd60a8463f2bb6d95099b0e
Prefer that enqueueable post-send updates are run immediately

If the user is not waiting at this point, so there is not much
reason to enqueue a job over just doing the work now. Running
the update now gives more immediate results however.

This has the effect of  making LinksUpdate run post-send for
forward link updates, since the addUpdate() call in WikiPage uses
the default POSTSEND mode. These updates used to be synchronous
in the past, before proper post-send update support. With post-send
updates, there is not much benefit to using the job queue here.

If post-send updates are not supported, this will continue to
use the job queue.

If a caller needs such updates to enqueue post-send to avoid DB
updates on HTTP GET or if the update is too big to run outside of
JobRunner, it can always just use JobQueueGroup::lazyPush() with
a direct job object or JobSpecification.

Change-Id: Ibc4b1e17538cc8b1fba7d13759e1ebb83abed869
includes/MediaWiki.php