From: Aaron Schulz Date: Thu, 10 Oct 2013 21:56:11 +0000 (-0700) Subject: Use max() for job count for sanity X-Git-Tag: 1.31.0-rc.0~18498^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=80eccf3803282b1cfb719fa84b4cfce465c2d0c8;p=lhc%2Fweb%2Fwiklou.git Use max() for job count for sanity Change-Id: If5979ccbede2dd70fcd26b7caae82419ddffe542 --- diff --git a/maintenance/showJobs.php b/maintenance/showJobs.php index 78c2e48e31..afd7c745ba 100644 --- a/maintenance/showJobs.php +++ b/maintenance/showJobs.php @@ -59,7 +59,7 @@ class ShowJobs extends Maintenance { $pending = $queue->getSize(); $claimed = $queue->getAcquiredCount(); $abandoned = $queue->getAbandonedCount(); - $active = $claimed - $abandoned; + $active = max( 0, $claimed - $abandoned ); if ( ( $pending + $claimed ) > 0 ) { $this->output( "{$type}: $pending queued; " .