01tonythomas has uploaded a new change for review.
https://gerrit.wikimedia.org/r/116094
Change subject: Removed Count column from Special:Statistics Table
......................................................................
Removed Count column from Special:Statistics Table
If your job queue isn't fast, if you submit a job and view
Special:Statistics before the submit job runs, you'll see 0
even though there are jobs queued. So the column is irrelevant,
and hence removed.
Bug: 56878
Change-Id: I0d5dcc833c6fb0a9a2a20cc34bab20bc3f604d3f
---
M MassMessage.body.php
M MassMessage.hooks.php
M MassMessage.php
3 files changed, 0 insertions(+), 39 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage
refs/changes/94/116094/1
diff --git a/MassMessage.body.php b/MassMessage.body.php
index 6405947..36a6225 100644
--- a/MassMessage.body.php
+++ b/MassMessage.body.php
@@ -207,23 +207,6 @@
}
/**
- * Get the number of Queued messages on this site
- * Taken from runJobs.php --group
- * @return int
- */
- public static function getQueuedCount() {
- $group = JobQueueGroup::singleton();
- $queue = $group->get( 'MassMessageJob' );
- $pending = $queue->getSize();
- $claimed = $queue->getAcquiredCount();
- $abandoned = $queue->getAbandonedCount();
- $active = max( $claimed - $abandoned, 0 );
-
- $queued = $active + $pending;
- return $queued;
- }
-
- /**
* Verify and cleanup the main user submitted data
* @param array &$data should have subject, message, and spamlist keys
* @param Status &$status
diff --git a/MassMessage.hooks.php b/MassMessage.hooks.php
index 5be2ba8..69bfb36 100644
--- a/MassMessage.hooks.php
+++ b/MassMessage.hooks.php
@@ -126,26 +126,6 @@
}
/**
- * Add a row with the number of queued messages to Special:Statistics
- * @param array $extraStats
- * @return bool
- */
- public static function onSpecialStatsAddExtra( &$extraStats ) {
- $extraStats['massmessage-queued-count'] =
MassMessage::getQueuedCount();
- return true;
- }
-
- /**
- * Add the number of queued messages to &meta=siteinfo&siprop=statistics
- * @param $result array
- * @return bool
- */
- public static function onAPIQuerySiteInfoStatisticsInfo( &$result ) {
- $result['queued-massmessages'] = MassMessage::getQueuedCount();
- return true;
- }
-
- /**
* Load our unit tests
*/
public static function onUnitTestsList( &$files ) {
diff --git a/MassMessage.php b/MassMessage.php
index ea345ad..61eef04 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -82,8 +82,6 @@
$wgJobClasses['MassMessageSubmitJob'] = 'MassMessageSubmitJob';
$wgHooks['ParserFirstCallInit'][] = 'MassMessageHooks::onParserFirstCallInit';
-$wgHooks['SpecialStatsAddExtra'][] =
'MassMessageHooks::onSpecialStatsAddExtra';
-$wgHooks['APIQuerySiteInfoStatisticsInfo'][] =
'MassMessageHooks::onAPIQuerySiteInfoStatisticsInfo';
$wgHooks['RenameUserPreRename'][] = 'MassMessageHooks::onRenameUserPreRename';
$wgHooks['UserGetReservedNames'][] =
'MassMessageHooks::onUserGetReservedNames';
$wgHooks['UnitTestsList'][] = 'MassMessageHooks::onUnitTestsList';
--
To view, visit https://gerrit.wikimedia.org/r/116094
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d5dcc833c6fb0a9a2a20cc34bab20bc3f604d3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits