jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: If5979ccbede2dd70fcd26b7caae82419ddffe542
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to