Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/205064
Change subject: Fix log entries saying 0 recipients were notified
......................................................................
Fix log entries saying 0 recipients were notified
As of e292bc972dd198b86 in mediawiki/core, JobQueueGroup::push() does not
return any value, and throws exceptions instead. So just assume all
recipients were notified properly.
Bug: T71887
Change-Id: If1efd998503250d00657272bab0856a565f7ec37
---
M SpecialNotifyTranslators.php
1 file changed, 4 insertions(+), 10 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslationNotifications
refs/changes/64/205064/1
diff --git a/SpecialNotifyTranslators.php b/SpecialNotifyTranslators.php
index db29086..f5e53ee 100644
--- a/SpecialNotifyTranslators.php
+++ b/SpecialNotifyTranslators.php
@@ -238,8 +238,7 @@
$currentUnixTime = wfTimestamp();
$currentDBTime = $dbr->timestamp( $currentUnixTime );
- $sentSuccess = 0;
- $sentFail = 0;
+ $count = 0;
$tooEarly = 0;
$timestampOptionName = 'translationnotifications-timestamp';
$jobs = array();
@@ -292,12 +291,7 @@
if ( $jobs ) {
$count = count( $jobs );
- $status = JobQueueGroup::singleton()->push( $jobs );
- if ( $status ) {
- $sentSuccess = $count;
- } else {
- $sentFail = $count;
- };
+ JobQueueGroup::singleton()->push( $jobs );
}
$logEntry = new ManualLogEntry( 'notifytranslators', 'sent' );
@@ -307,8 +301,8 @@
'4::languagesForLog' => $languagesForLog,
'5::deadlineDate' => $this->deadlineDate,
'6::priority' => $this->priority,
- '7::sentSuccess' => $sentSuccess,
- '8::sentFail' => $sentFail,
+ '7::sentSuccess' => $count,
+ '8::sentFail' => 0, // @todo is this still needed?
'9::tooEarly' => $tooEarly,
) );
--
To view, visit https://gerrit.wikimedia.org/r/205064
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If1efd998503250d00657272bab0856a565f7ec37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits