jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370856 )

Change subject: api: Fix 'replag.lagged' data to look at all instead of just 
the last shard
......................................................................


api: Fix 'replag.lagged' data to look at all instead of just the last shard

Follows-up c2b7e7a, 7741b64.

Change-Id: I4a079d841047ebbb3f478d87e9670a01a48df434
---
M api.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/api.php b/api.php
index 3d45418..e58bdf9 100644
--- a/api.php
+++ b/api.php
@@ -63,9 +63,9 @@
                 'SELECT lag FROM heartbeat WHERE shard = ?',
                 [ $cluster ]
             );
-            $data['lag'][$cluster] = $res[0]['lag'];
+            $data['lag'][$cluster] = (int)$res[0]['lag'];
         }
-        $max = max($data['lag'][$cluster]);
+        $max = max($data['lag']);
         if ($max > 0) {
             $int = new Intuition(array(
                 'domain' => 'guc',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a079d841047ebbb3f478d87e9670a01a48df434
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to