20 public function run() {
21 $services = MediaWikiServices::getInstance();
22 $watchedItemStore = $services->getWatchedItemStore();
23 $watchedItemStore->removeExpired( 100 );
24 if ( $watchedItemStore->countExpired() ) {
26 $services->getJobQueueGroup()->push(
new static() );
Class to both describe a background job and handle jobs.
array $params
Array of job parameters.
__construct(string $command='watchlistExpiry', array $params=[])
run()
Run the job recursively in batches of 100 until there are no more expired items.