You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2022/04/22 22:01:34 UTC

[whimsy] branch master updated: Another warning type

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 793f20be Another warning type
793f20be is described below

commit 793f20be1b6e226ac78f93f2789c4937cf0cbfcc
Author: Sebb <se...@apache.org>
AuthorDate: Fri Apr 22 23:01:27 2022 +0100

    Another warning type
---
 www/status/monitors/public_json.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/status/monitors/public_json.rb b/www/status/monitors/public_json.rb
index b66c4a0a..5ae89c5a 100644
--- a/www/status/monitors/public_json.rb
+++ b/www/status/monitors/public_json.rb
@@ -61,6 +61,11 @@ def Monitor.public_json(previous_status)
           title: "#{warnings.length} warnings"
       end
 
+      # Ruby warnings
+      if contents.gsub!(%r{^/(?:var|usr)/lib/\S+: (warning:.*?)\n+}, '')
+        status[name].merge! level: 'warning', data: $1
+      end
+
       # Check to see if the log has been updated recently
       if Time.now - File.mtime(log) > warning_period
         status[name].merge! level: 'warning',
@@ -73,11 +78,6 @@ def Monitor.public_json(previous_status)
           data: "Last updated: #{File.mtime(log).to_s} (more than 24 hours old)"
       end
 
-      # Ruby warnings
-      if contents.gsub!(%r{^/var/lib/\S+: (warning:.*?)\n+}, '')
-        status[name].merge! level: 'warning', data: $1
-      end
-
       # Treat everything left as an error to be reported
       unless contents.empty?
         status[name].merge! level: 'danger', data: contents.split("\n")