diff options
author | Aaron Schulz <aschulz@wikimedia.org> | 2019-03-29 23:07:48 -0700 |
---|---|---|
committer | Aaron Schulz <aschulz@wikimedia.org> | 2019-04-08 11:05:23 -0700 |
commit | fc5d51f12936edb4c7d067e298b5ec3a7c09a8fa (patch) | |
tree | 65dcb1a353a266340b064397cd973aba9054dde2 /includes/deferred | |
parent | 54a8b9a14f42b063a143a981067ba564860ec556 (diff) | |
download | mediawikicore-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.php | 11 |
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 + ] ) ); } } |