diff options
author | Robby Zambito <contact@robbyzambito.me> | 2025-08-08 12:57:00 -0400 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2025-08-08 12:57:50 -0400 |
commit | a6105d2dda398531ee66f996fa6d69fe934e6f5c (patch) | |
tree | 26439d9e236ff59d4ad5ce26666531c10b941e3f | |
parent | e641812d9fc55dff2e5d18ae5c557fc8c74c4c14 (diff) |
Randomly resolve incidents
-rw-r--r-- | internal/api/handlers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/api/handlers.go b/internal/api/handlers.go index 676f57f..5a31fa3 100644 --- a/internal/api/handlers.go +++ b/internal/api/handlers.go @@ -176,6 +176,11 @@ func init() { case <-tick1s.C: fmt.Println("1 s tick") case <-tick10s.C: + for i := range status.incidents { + runChance(0.05, func() { + status.incidents[i].Status = StatusOperational + }) + } runChance(1.0, func() { severity := SeverityMinor runChance(0.3, func() { |