Ppchelko has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/386377 )
Change subject: [JobExecutor] Use strict comparation to false.
......................................................................
[JobExecutor] Use strict comparation to false.
Some jobs (wikibase one for example) don't return the execution
status from the run() method. This is clearly a bug on their side,
but the old JobQueue could deal with that by using strict === false
to check the job status. I think we should do the same.
Bug: T178997
Change-Id: I9b60738260d9249f794bd7edeafafb0aa7278699
---
M JobExecutor.php
M SpecialRunSingleJob.php
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventBus
refs/changes/77/386377/1
diff --git a/JobExecutor.php b/JobExecutor.php
index b649c63..01df588 100644
--- a/JobExecutor.php
+++ b/JobExecutor.php
@@ -42,7 +42,7 @@
$message = $job->getLastError();
$lbFactory->commitMasterChanges( $fnameTrxOwner );
- if ( !$status ) {
+ if ( $status === false ) {
$this->logger()->error( $job->toString() . "
error={$message}" );
}
diff --git a/SpecialRunSingleJob.php b/SpecialRunSingleJob.php
index 93e0b51..fea41e9 100644
--- a/SpecialRunSingleJob.php
+++ b/SpecialRunSingleJob.php
@@ -116,7 +116,7 @@
try {
// execute the job
$response = $executor->execute( $event );
- if ( $response['status'] === true ) {
+ if ( $response['status'] !== false ) {
HttpStatus::header( 200 );
return;
} else {
--
To view, visit https://gerrit.wikimedia.org/r/386377
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b60738260d9249f794bd7edeafafb0aa7278699
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits