jenkins-bot has submitted this change and it was merged. Change subject: Make FetchScoreJob.php more readable ......................................................................
Make FetchScoreJob.php more readable Based on https://gerrit.wikimedia.org/r/#/c/302703/ Change-Id: I5d08a4682dffb84a80963f1dbf2b7c1569d39a18 --- M includes/FetchScoreJob.php 1 file changed, 5 insertions(+), 7 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/FetchScoreJob.php b/includes/FetchScoreJob.php index c61719f..ad1e619 100644 --- a/includes/FetchScoreJob.php +++ b/includes/FetchScoreJob.php @@ -21,17 +21,15 @@ $scores = Scoring::instance()->getScores( $this->params['revid'], null, $this->params['extra_params'] ); $cache = Cache::instance(); - $status = null; - $cache->setErrorCallback( function ( $mssg, $revision ) use ( &$status, &$logger ) { + $success = true; + $cache->setErrorCallback( function ( $mssg, $revision ) use ( &$success, $logger ) { $logger->warning( "Scoring errored for $revision: $mssg\n" ); - $status = false; + $success = false; } ); $cache->storeScores( $scores ); - if ( $status === false ) { - return false; - } else { + if ( $success === true ) { $logger->debug( 'Stored scores: ' . json_encode( $scores ) ); - return true; } + return $success; } } -- To view, visit https://gerrit.wikimedia.org/r/304686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d08a4682dffb84a80963f1dbf2b7c1569d39a18 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Ladsgroup <[email protected]> Gerrit-Reviewer: Ladsgroup <[email protected]> Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
