Handles pruning wb_changes table, used by pruneChanges maintenance script.
More...
Handles pruning wb_changes table, used by pruneChanges maintenance script.
- Copyright
- GPL-2.0-or-later
- Author
- Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
◆ __construct()
Wikibase\Repo\ChangePruner::__construct |
( |
RepoDomainDb |
$db, |
|
|
|
$batchSize, |
|
|
|
$keepSeconds, |
|
|
|
$graceSeconds, |
|
|
|
$ignoreDispatch |
|
) |
| |
- Parameters
-
RepoDomainDb | $db | |
int | $batchSize | |
int | $keepSeconds | |
int | $graceSeconds | |
bool | $ignoreDispatch | |
- Exceptions
-
◆ getCutoffTimestamp()
Wikibase\Repo\ChangePruner::getCutoffTimestamp |
( |
| ) |
|
|
private |
Calculates the timestamp up to which changes can be pruned.
- Returns
- string Timestamp up to which changes can be pruned (as MediaWiki concatenated string timestamp).
◆ getMessageReporter()
Wikibase\Repo\ChangePruner::getMessageReporter |
( |
| ) |
|
◆ limitCutoffTimestamp()
Wikibase\Repo\ChangePruner::limitCutoffTimestamp |
( |
|
$until | ) |
|
|
private |
Changes the cutoff timestamp to not affect more than $this->batchSize rows, if needed.
- Parameters
-
string | $until | MediaWiki concatenated string timestamp |
- Returns
- string MediaWiki concatenated string timestamp
◆ prune()
Wikibase\Repo\ChangePruner::prune |
( |
| ) |
|
Prunes the wb_changes table.
◆ pruneChanges()
Wikibase\Repo\ChangePruner::pruneChanges |
( |
|
$until | ) |
|
|
private |
Prunes all changes older than $until from the changes table.
- Parameters
-
string | $until | MediaWiki concatenated string timestamp |
- Returns
- int the number of changes deleted.
◆ setMessageReporter()
Wikibase\Repo\ChangePruner::setMessageReporter |
( |
MessageReporter |
$messageReporter | ) |
|
◆ $batchSize
Wikibase\Repo\ChangePruner::$batchSize |
|
private |
◆ $db
Wikibase\Repo\ChangePruner::$db |
|
private |
◆ $graceSeconds
Wikibase\Repo\ChangePruner::$graceSeconds |
|
private |
◆ $ignoreDispatch
Wikibase\Repo\ChangePruner::$ignoreDispatch |
|
private |
◆ $keepSeconds
Wikibase\Repo\ChangePruner::$keepSeconds |
|
private |
◆ $messageReporter
Wikibase\Repo\ChangePruner::$messageReporter |
|
private |
The documentation for this class was generated from the following file: