aboutsummaryrefslogtreecommitdiffstats
path: root/includes/deferred
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2019-03-29 23:07:48 -0700
committerAaron Schulz <aschulz@wikimedia.org>2019-04-08 11:05:23 -0700
commitfc5d51f12936edb4c7d067e298b5ec3a7c09a8fa (patch)
tree65dcb1a353a266340b064397cd973aba9054dde2 /includes/deferred
parent54a8b9a14f42b063a143a981067ba564860ec556 (diff)
downloadmediawikicore-fc5d51f12936edb4c7d067e298b5ec3a7c09a8fa.tar.gz
mediawikicore-fc5d51f12936edb4c7d067e298b5ec3a7c09a8fa.zip
jobqueue: add GenericParameterJob and RunnableJob interface
Simplify the code of jobs that do not care about titles and removes the direct Title dependency from JobQueue. Remove getTitle() from IJobSpecification itself. Move all the Job::factory calls into a single JobQueue::factoryJob() method. Depends-on: Iee78f4baeca0c0b4d6db073f2fbcc56855114ab0 Change-Id: I9c9d0726d4066bb0aa937665847ad6042ade13ec
Diffstat (limited to 'includes/deferred')
-rw-r--r--includes/deferred/CdnCacheUpdate.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/includes/deferred/CdnCacheUpdate.php b/includes/deferred/CdnCacheUpdate.php
index 6f961e8b71d7..2d07f75156eb 100644
--- a/includes/deferred/CdnCacheUpdate.php
+++ b/includes/deferred/CdnCacheUpdate.php
@@ -71,13 +71,10 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
self::purge( $this->urls );
if ( $wgCdnReboundPurgeDelay > 0 ) {
- JobQueueGroup::singleton()->lazyPush( new CdnPurgeJob(
- Title::makeTitle( NS_SPECIAL, 'Badtitle/' . __CLASS__ ),
- [
- 'urls' => $this->urls,
- 'jobReleaseTimestamp' => time() + $wgCdnReboundPurgeDelay
- ]
- ) );
+ JobQueueGroup::singleton()->lazyPush( new CdnPurgeJob( [
+ 'urls' => $this->urls,
+ 'jobReleaseTimestamp' => time() + $wgCdnReboundPurgeDelay
+ ] ) );
}
}