From: Aaron Schulz Date: Fri, 18 Jul 2014 18:01:01 +0000 (-0700) Subject: Made --maxtime a soft limit again X-Git-Tag: 1.31.0-rc.0~14888 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=76b8f814199cf6bf6196ed64e993e575c97bbcc1;p=lhc%2Fweb%2Fwiklou.git Made --maxtime a soft limit again * The new job loop already manages timeouts and this version caused some problems with the time-sharing approach that used --maxtime. This killed runners too fast for some jobs and only handled CPU time anyway, not wall clock time. Change-Id: Id3462554b1ecba9ecdf7d49673645d54c0555cd6 --- diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 1383a8ac6b..423ae6152b 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -101,8 +101,6 @@ class RunJobs extends Maintenance { ++$jobsRun; $this->runJobsLog( $job->toString() . " STARTING" ); - // Set timer to stop the job if too much CPU time is used - set_time_limit( $maxTime ? : 0 ); // Run the job... wfProfileIn( __METHOD__ . '-' . get_class( $job ) ); $t = microtime( true ); @@ -117,8 +115,6 @@ class RunJobs extends Maintenance { } $timeMs = intval( ( microtime( true ) - $t ) * 1000 ); wfProfileOut( __METHOD__ . '-' . get_class( $job ) ); - // Disable the timer - set_time_limit( 0 ); // Mark the job as done on success or when the job cannot be retried if ( $status !== false || !$job->allowRetries() ) {