mirror of https://github.com/statping/statping
Add implementation of new `Service` Fields in checker.go
Add Variable Value changes of `SuccessNOtified`, `UpdateNotify` and `DownText` to checker.go. So the Values can be used in other packages.pull/258/head
parent
d81c525d71
commit
e1c41966e4
|
@ -263,6 +263,7 @@ func recordSuccess(s *Service) {
|
|||
s.CreateHit(hit)
|
||||
s.Online = true
|
||||
notifier.OnSuccess(s.Service)
|
||||
s.SuccessNotified = true
|
||||
}
|
||||
|
||||
// recordFailure will create a new 'Failure' record in the database for a offline service
|
||||
|
@ -277,5 +278,8 @@ func recordFailure(s *Service, issue string) {
|
|||
utils.Log(2, fmt.Sprintf("Service %v Failing: %v | Lookup in: %0.2f ms", s.Name, issue, fail.PingTime*1000))
|
||||
s.CreateFailure(fail)
|
||||
s.Online = false
|
||||
s.SuccessNotified = false
|
||||
s.UpdateNotify = CoreApp.UpdateNotify.Bool
|
||||
s.DownText = s.DowntimeText()
|
||||
notifier.OnFailure(s.Service, fail.Failure)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue