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/11/18 14:16:25 UTC

[whimsy] branch master updated: Must remove both entries in same check!

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 431e382b Must remove both entries in same check!
431e382b is described below

commit 431e382b219e090ec4c163509e43c3417274e744
Author: Sebb <se...@apache.org>
AuthorDate: Fri Nov 18 14:16:19 2022 +0000

    Must remove both entries in same check!
---
 www/status/monitors/site_scan.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/status/monitors/site_scan.rb b/www/status/monitors/site_scan.rb
index 214a5636..373d3b48 100644
--- a/www/status/monitors/site_scan.rb
+++ b/www/status/monitors/site_scan.rb
@@ -33,8 +33,8 @@ def Monitor.site_scan(previous_status)
     FileUtils.mkdir(archive) unless File.directory?(archive)
     file = File.basename(logfile)
     level = 'danger'
-    level = 'warning' if log.gsub(/.* error\n/, '').empty?
-    level = 'warning' if log.gsub(/WARN: timeout scanning.*\n/, '').empty?
+    # remove all non-fatal messages
+    level = 'warning' if log.gsub(/(.* error|WARN: timeout scanning.*)\n/, '').empty?
     FileUtils.copy logfile, File.join(archive, file + '.' + level), preserve: true
     {
       level: level,