mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 06:06:38 +01:00
Merge pull request #141 from v2tec/do-not-send-empty-mails
Do not send an email notification when no messages have been logged.
This commit is contained in:
commit
bbd24e3199
1 changed files with 2 additions and 2 deletions
|
|
@ -87,10 +87,10 @@ func (e *emailTypeNotifier) StartNotification() {
|
|||
}
|
||||
|
||||
func (e *emailTypeNotifier) SendNotification() {
|
||||
if e.entries != nil {
|
||||
if e.entries != nil && len(e.entries) != 0 {
|
||||
e.sendEntries(e.entries)
|
||||
e.entries = nil
|
||||
}
|
||||
e.entries = nil
|
||||
}
|
||||
|
||||
func (e *emailTypeNotifier) Levels() []log.Level {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue