jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341828 )

Change subject: Warn when some of the captcha generation operations fail
......................................................................


Warn when some of the captcha generation operations fail

Change-Id: If0567186410673137b08633205c3322753985412
(cherry picked from commit 175486431be0a1aa176bbd26eb4c418761c63732)
---
M maintenance/GenerateFancyCaptchas.php
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/GenerateFancyCaptchas.php 
b/maintenance/GenerateFancyCaptchas.php
index dd61c09..5c17c99 100644
--- a/maintenance/GenerateFancyCaptchas.php
+++ b/maintenance/GenerateFancyCaptchas.php
@@ -178,10 +178,20 @@
                                $this->output(
                                        sprintf(
                                                "\nCopied %d captchas to 
storage in %.1f seconds\n",
-                                               $captchasGenerated,
+                                               $ret->successCount,
                                                $storeTime
                                        )
                                );
+                               if ( $ret->failCount ) {
+                                       $this->output( sprintf( "\nFailed to 
copy %d captchas\n", $ret->failCount ) );
+                               }
+                               if ( $ret->successCount + $ret->failCount !== 
$captchasGenerated ) {
+                                       $this->output(
+                                               sprintf( "Internal error: 
captchasGenerated: %d, successCount: %d, failCount: %d\n",
+                                                       $captchasGenerated, 
$ret->successCount, $ret->failCount
+                                               )
+                                       );
+                               }
                        } else {
                                $this->output( "Errored.\n" );
                                $this->output( implode( "\n", Status::wrap( 
$ret )->getWikiText( null, null, 'en' ) ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0567186410673137b08633205c3322753985412
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: wmf/1.29.0-wmf.14
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to