Reedy has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/28/341828/1

diff --git a/maintenance/GenerateFancyCaptchas.php 
b/maintenance/GenerateFancyCaptchas.php
index 9ab972b..f891395 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", $ret->getErrors() 
) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0567186410673137b08633205c3322753985412
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: wmf/1.29.0-wmf.14
Gerrit-Owner: Reedy <[email protected]>

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

Reply via email to