jobqueue: add GenericParameterJob and RunnableJob interface
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 30 Mar 2019 06:07:48 +0000 (23:07 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 8 Apr 2019 18:05:23 +0000 (11:05 -0700)
commitfc5d51f12936edb4c7d067e298b5ec3a7c09a8fa
tree65dcb1a353a266340b064397cd973aba9054dde2
parent54a8b9a14f42b063a143a981067ba564860ec556
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
27 files changed:
autoload.php
includes/deferred/CdnCacheUpdate.php
includes/jobqueue/GenericParameterJob.php [new file with mode: 0644]
includes/jobqueue/IJobSpecification.php
includes/jobqueue/Job.php
includes/jobqueue/JobQueue.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueFederated.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobQueueMemory.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/JobSpecification.php
includes/jobqueue/RunnableJob.php [new file with mode: 0644]
includes/jobqueue/jobs/CdnPurgeJob.php
includes/jobqueue/jobs/ClearUserWatchlistJob.php
includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php
includes/jobqueue/jobs/DeletePageJob.php
includes/jobqueue/jobs/DuplicateJob.php
includes/jobqueue/jobs/EnqueueJob.php
includes/jobqueue/jobs/NullJob.php
includes/jobqueue/jobs/UserGroupExpiryJob.php
includes/page/WikiPage.php
includes/watcheditem/WatchedItemStore.php
tests/phpunit/includes/SiteStatsTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/jobqueue/JobTest.php
tests/phpunit/includes/jobqueue/jobs/ClearUserWatchlistJobTest.php