MediaWiki master
|
Class for handling updates to the site_stats table. More...
Inherits MediaWiki\Deferred\DeferrableUpdate, and MediaWiki\Deferred\MergeableUpdate.
Public Member Functions | |
__construct ( $views, $edits, $good, $pages=0, $users=0) | |
doUpdate () | |
Perform the actual work. | |
merge (MergeableUpdate $update) | |
Merge this enqueued update with a new MergeableUpdate of the same qualified class name. | |
Static Public Member Functions | |
static | cacheUpdate (IDatabase $dbw) |
static | factory (array $deltas) |
Public Attributes | |
const | SHARDS_ON = 10 |
Protected Attributes | |
int | $articles = 0 |
int | $edits = 0 |
int | $images = 0 |
int | $pages = 0 |
int | $users = 0 |
Class for handling updates to the site_stats table.
Definition at line 34 of file SiteStatsUpdate.php.
MediaWiki\Deferred\SiteStatsUpdate::__construct | ( | $views, | |
$edits, | |||
$good, | |||
$pages = 0, | |||
$users = 0 ) |
Definition at line 61 of file SiteStatsUpdate.php.
References MediaWiki\Deferred\SiteStatsUpdate\$edits, MediaWiki\Deferred\SiteStatsUpdate\$pages, and MediaWiki\Deferred\SiteStatsUpdate\$users.
|
static |
IDatabase | $dbw |
Definition at line 182 of file SiteStatsUpdate.php.
References MediaWiki\MainConfigNames\ActiveUserDays, MediaWiki\MediaWikiServices\getInstance(), Wikimedia\Rdbms\IDatabase\newUpdateQueryBuilder(), and RC_EXTERNAL.
MediaWiki\Deferred\SiteStatsUpdate::doUpdate | ( | ) |
Perform the actual work.
Implements MediaWiki\Deferred\DeferrableUpdate.
Definition at line 107 of file SiteStatsUpdate.php.
References Wikimedia\Rdbms\Platform\ISQLPlatform\addIdentifierQuotes(), Wikimedia\Rdbms\Platform\ISQLPlatform\buildGreatest(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\MultiShardSiteStats, Wikimedia\Rdbms\IDatabase\newInsertQueryBuilder(), Wikimedia\Rdbms\IDatabase\newUpdateQueryBuilder(), and MediaWiki\Deferred\SiteStatsUpdate\SHARDS_ON.
|
static |
int[] | $deltas | Map of (counter type => integer delta) e.g. SiteStatsUpdate::factory( [ 'edits' => 10, 'articles' => 2, 'pages' => 7, 'users' => 5, ] ); |
UnexpectedValueException |
Definition at line 91 of file SiteStatsUpdate.php.
MediaWiki\Deferred\SiteStatsUpdate::merge | ( | MergeableUpdate | $update | ) |
Merge this enqueued update with a new MergeableUpdate of the same qualified class name.
MergeableUpdate | $update | The new update (having the same class) |
Implements MediaWiki\Deferred\MergeableUpdate.
Definition at line 68 of file SiteStatsUpdate.php.
|
protected |
Definition at line 40 of file SiteStatsUpdate.php.
|
protected |
Definition at line 36 of file SiteStatsUpdate.php.
Referenced by MediaWiki\Deferred\SiteStatsUpdate\__construct().
|
protected |
Definition at line 44 of file SiteStatsUpdate.php.
|
protected |
Definition at line 38 of file SiteStatsUpdate.php.
Referenced by MediaWiki\Deferred\SiteStatsUpdate\__construct().
|
protected |
Definition at line 42 of file SiteStatsUpdate.php.
Referenced by MediaWiki\Deferred\SiteStatsUpdate\__construct().
const MediaWiki\Deferred\SiteStatsUpdate::SHARDS_ON = 10 |
Definition at line 47 of file SiteStatsUpdate.php.
Referenced by MediaWiki\Deferred\SiteStatsUpdate\doUpdate().