Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/89123


Change subject: Use max() for job count for sanity
......................................................................

Use max() for job count for sanity

Change-Id: If5979ccbede2dd70fcd26b7caae82419ddffe542
---
M maintenance/showJobs.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/89123/1

diff --git a/maintenance/showJobs.php b/maintenance/showJobs.php
index 78c2e48..afd7c74 100644
--- a/maintenance/showJobs.php
+++ b/maintenance/showJobs.php
@@ -59,7 +59,7 @@
                                $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; " .

-- 
To view, visit https://gerrit.wikimedia.org/r/89123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5979ccbede2dd70fcd26b7caae82419ddffe542
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to