jenkins-bot has submitted this change and it was merged. Change subject: Cleaned up upload job error reporting. ......................................................................
Cleaned up upload job error reporting. Change-Id: I2379d235eb9fed58412c9fefb9cabe56868395b9 --- M includes/job/jobs/AssembleUploadChunksJob.php M includes/job/jobs/PublishStashedFileJob.php 2 files changed, 17 insertions(+), 13 deletions(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/job/jobs/AssembleUploadChunksJob.php b/includes/job/jobs/AssembleUploadChunksJob.php index 840a398..f243b0c 100644 --- a/includes/job/jobs/AssembleUploadChunksJob.php +++ b/includes/job/jobs/AssembleUploadChunksJob.php @@ -39,7 +39,7 @@ $user = $context->getUser(); if ( !$user->isLoggedIn() || $user->getId() != $this->params['userid'] ) { $this->setLastError( "Could not load the author user from session." ); - return true; // no retries + return false; } UploadBase::setSessionStatus( @@ -62,7 +62,7 @@ array( 'result' => 'Failure', 'stage' => 'assembling', 'status' => $status ) ); $this->setLastError( $status->getWikiText() ); - return true; // no retries + return false; } // We have a new filekey for the fully concatenated file @@ -99,13 +99,11 @@ ) ); $this->setLastError( get_class( $e ) . ": " . $e->getText() ); + return false; } - return true; // returns true on success and erro (no retries) + return true; } - /** - * @return Array - */ public function getDeduplicationInfo() { $info = parent::getDeduplicationInfo(); if ( is_array( $info['params'] ) ) { @@ -113,4 +111,8 @@ } return $info; } + + public function allowRetries() { + return false; + } } diff --git a/includes/job/jobs/PublishStashedFileJob.php b/includes/job/jobs/PublishStashedFileJob.php index 594d304..87dffc9 100644 --- a/includes/job/jobs/PublishStashedFileJob.php +++ b/includes/job/jobs/PublishStashedFileJob.php @@ -39,7 +39,7 @@ $user = $context->getUser(); if ( !$user->isLoggedIn() || $user->getId() != $this->params['userid'] ) { $this->setLastError( "Could not load the author user from session." ); - return true; // no retries + return false; } UploadBase::setSessionStatus( @@ -64,7 +64,7 @@ array( 'result' => 'Failure', 'stage' => 'publish', 'status' => $status ) ); $this->setLastError( "Could not verify upload." ); - return true; // no retries + return false; } // Upload the stashed file to a permanent location @@ -80,7 +80,7 @@ array( 'result' => 'Failure', 'stage' => 'publish', 'status' => $status ) ); $this->setLastError( $status->getWikiText() ); - return true; // no retries + return false; } // Build the image info array while we have the local reference handy @@ -111,13 +111,11 @@ ) ); $this->setLastError( get_class( $e ) . ": " . $e->getText() ); + return false; } - return true; // returns true on success and erro (no retries) + return true; } - /** - * @return Array - */ public function getDeduplicationInfo() { $info = parent::getDeduplicationInfo(); if ( is_array( $info['params'] ) ) { @@ -125,4 +123,8 @@ } return $info; } + + public function allowRetries() { + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/53785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2379d235eb9fed58412c9fefb9cabe56868395b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Demon <ch...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits