Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4145371
WatchlistExpiryJob.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
950 B
Referenced Files
None
Subscribers
None
WatchlistExpiryJob.php
View Options
<?php
namespace
MediaWiki\Watchlist
;
use
MediaWiki\JobQueue\Job
;
use
MediaWiki\MediaWikiServices
;
/**
* @internal For use by WatchedItemStore
* @ingroup JobQueue
*/
class
WatchlistExpiryJob
extends
Job
{
public
function
__construct
(
string
$command
=
'watchlistExpiry'
,
array
$params
=
[]
)
{
parent
::
__construct
(
$command
,
$params
);
}
/**
* Run the job recursively in batches of 100 until there are no more expired items.
*
* @return bool Always true, to indicate success.
*/
public
function
run
()
{
$services
=
MediaWikiServices
::
getInstance
();
$watchedItemStore
=
$services
->
getWatchedItemStore
();
$watchedItemStore
->
removeExpired
(
100
);
if
(
$watchedItemStore
->
countExpired
()
)
{
// If there are still items, add a new job.
$services
->
getJobQueueGroup
()->
push
(
new
static
()
);
}
return
true
;
}
}
/** @deprecated class alias since 1.43 */
class_alias
(
WatchlistExpiryJob
::
class
,
'WatchlistExpiryJob'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 17:37 (5 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f8/a6/23ec5207cfd198bd3748ee02e063
Default Alt Text
WatchlistExpiryJob.php (950 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment