MtDu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/324807

Change subject: Update Maintenance scripts to use $this->requireExtension() * 
Also added $this->mDescription to removeInvalidNotification
......................................................................

Update Maintenance scripts to use $this->requireExtension()
* Also added $this->mDescription to removeInvalidNotification

Bug: T152139
Change-Id: I146405a3b6e81680b0ee1fb081486170d914a2b1
---
M maintenance/backfillReadBundles.php
M maintenance/backfillUnreadWikis.php
M maintenance/generateSampleNotifications.php
M maintenance/processEchoEmailBatch.php
M maintenance/removeInvalidNotification.php
M maintenance/removeOrphanedEvents.php
M maintenance/testDiscussionParser.php
M maintenance/updateEchoSchemaForSuppression.php
8 files changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/07/324807/1

diff --git a/maintenance/backfillReadBundles.php 
b/maintenance/backfillReadBundles.php
index c6a54dd..66a8c64 100644
--- a/maintenance/backfillReadBundles.php
+++ b/maintenance/backfillReadBundles.php
@@ -13,6 +13,8 @@
                $this->mDescription = "Backfill 
echo_notification.notification_read_timestamp for bundles";
 
                $this->setBatchSize( 300 );
+
+               $this->requireExtension( 'Echo' );
        }
 
        public function execute() {
diff --git a/maintenance/backfillUnreadWikis.php 
b/maintenance/backfillUnreadWikis.php
index 9914309..18f13a8 100644
--- a/maintenance/backfillUnreadWikis.php
+++ b/maintenance/backfillUnreadWikis.php
@@ -13,6 +13,7 @@
                $this->mDescription = "Backfill echo_unread_wikis table";
                $this->addOption( 'rebuild', 'Only recompute already-existing 
rows' );
                $this->setBatchSize( 300 );
+               $this->requireExtension( 'Echo' );
        }
 
        public function execute() {
diff --git a/maintenance/generateSampleNotifications.php 
b/maintenance/generateSampleNotifications.php
index 0793f83..8fd7994 100644
--- a/maintenance/generateSampleNotifications.php
+++ b/maintenance/generateSampleNotifications.php
@@ -55,6 +55,8 @@
                        'other',
                        'Name of another user involved with the notifications',
                        true, true, 'o' );
+
+               $this->requireExtension( 'Echo' );
        }
 
        public function execute() {
diff --git a/maintenance/processEchoEmailBatch.php 
b/maintenance/processEchoEmailBatch.php
index ad94331..34f726c 100644
--- a/maintenance/processEchoEmailBatch.php
+++ b/maintenance/processEchoEmailBatch.php
@@ -25,6 +25,8 @@
                        "ignoreConfiguredSchedule",
                        "Send all pending notifications immediately even if 
configured to be weekly or daily.",
                        false, false, "i" );
+
+               $this->requireExtension( 'Echo' );
        }
 
        public function execute() {
diff --git a/maintenance/removeInvalidNotification.php 
b/maintenance/removeInvalidNotification.php
index 588b564..65b4ddd 100644
--- a/maintenance/removeInvalidNotification.php
+++ b/maintenance/removeInvalidNotification.php
@@ -18,6 +18,11 @@
        protected $batchSize = 500;
        protected $invalidEventType = array( 'article-linked' );
 
+       public function __construct() {
+               $this->mDescription = "Removes invalid notifications from the 
database.";
+               $this->requireExtension( 'Echo' );
+       }
+
        public function execute() {
                if ( !$this->invalidEventType ) {
                        $this->output( "There is nothing to process\n" );
diff --git a/maintenance/removeOrphanedEvents.php 
b/maintenance/removeOrphanedEvents.php
index a639cd7..047265a 100644
--- a/maintenance/removeOrphanedEvents.php
+++ b/maintenance/removeOrphanedEvents.php
@@ -21,6 +21,8 @@
                $this->mDescription = "Remove rows from echo_event that don't 
have corresponding rows in echo_notification";
 
                $this->setBatchSize( 500 );
+
+               $this->requireExtension( 'Echo' );
        }
 
        public function getUpdateKey() {
diff --git a/maintenance/testDiscussionParser.php 
b/maintenance/testDiscussionParser.php
index 0f84dc7..baf3bb9 100644
--- a/maintenance/testDiscussionParser.php
+++ b/maintenance/testDiscussionParser.php
@@ -12,6 +12,8 @@
                $this->mDescription = "Takes enwiki revision IDs and attempts 
to identify interested users";
 
                $this->addArg( 'revisions', 'Revision IDs, separated by 
commas', true /*required*/ );
+
+               $this->requireExtension( 'Echo' );
        }
 
        public function execute() {
diff --git a/maintenance/updateEchoSchemaForSuppression.php 
b/maintenance/updateEchoSchemaForSuppression.php
index 6224af5..cfba653 100644
--- a/maintenance/updateEchoSchemaForSuppression.php
+++ b/maintenance/updateEchoSchemaForSuppression.php
@@ -29,6 +29,7 @@
        public function __construct() {
                parent::__construct();
                $this->setBatchSize( 500 );
+               $this->requireExtension( 'Echo' );
        }
 
        public function getUpdateKey() {

-- 
To view, visit https://gerrit.wikimedia.org/r/324807
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I146405a3b6e81680b0ee1fb081486170d914a2b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: MtDu <justin.d...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to