From 3283a2dd0aefe585d0f783db380b538f13b30279 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 13 Feb 2013 10:56:22 -0800 Subject: [PATCH] Treat a null result of Job::run() like "true". Change-Id: Ie5b725b9d8aad9d6b1869242e82b13306b61478f --- maintenance/runJobs.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 3fc928843b..f64b5e82f7 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -90,15 +90,16 @@ class RunJobs extends Maintenance { // Perform the job (logging success/failure and runtime)... $t = microtime( true ); $this->runJobsLog( $job->toString() . " STARTING" ); - $status = $job->run(); - if( !is_bool( $status ) ) { - wfWarn( $job->toString() . ' must return boolean and didn\'t!' ); + $status = $job->run(); + if ( !is_bool( $status ) ) { + wfWarn( $job->getType() . " job failed to return a boolean." ); + $status = true; // sanity } - if ( $status ) { $group->ack( $job ); // done } + $t = microtime( true ) - $t; $timeMs = intval( $t * 1000 ); if ( !$status ) { -- 2.20.1