Add pre-send update support to DeferredUpdates
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 30 Nov 2015 22:02:53 +0000 (14:02 -0800)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 4 Dec 2015 19:08:27 +0000 (19:08 +0000)
commit34dd248e285abbfab09f124ab7803b40101c5505
treecafcb715e942e895f9f397cce1713f2ec230fbac
parent323a2909ba1f43407ccba8bc1fadf2d25f2de488
Add pre-send update support to DeferredUpdates

* PRESEND/POSTSEND constants can now be used in addUpdate()
  and addCallableUpdate() to control when the update runs.
  This is useful for updates that may report errors the client
  should see or to just get a head start on queued or pubsub
  based updates like CDN purges. The OutputPage::output() method
  can easily take a few 100ms.
* Removed some argument b/c code from doUpdates().
* Also moved DeferrableUpdate to a separate file.

Change-Id: I9831fe890f9f68f9ad8c4f4bba6921a8f29ba666
autoload.php
includes/MediaWiki.php
includes/deferred/DeferrableUpdate.php [new file with mode: 0644]
includes/deferred/DeferredUpdates.php
tests/phpunit/includes/deferred/DeferredUpdatesTest.php