sleep on start before getting email
This commit is contained in:
2
main.go
2
main.go
@@ -22,6 +22,7 @@ func main() {
|
||||
lock := &sync.Mutex{}
|
||||
go func() {
|
||||
for {
|
||||
time.Sleep(config.Get().Interval.Email.Get())
|
||||
if config.Get().EmailerEnabled {
|
||||
lock.Lock()
|
||||
if err := email(); err != nil {
|
||||
@@ -29,7 +30,6 @@ func main() {
|
||||
}
|
||||
lock.Unlock()
|
||||
}
|
||||
time.Sleep(config.Get().Interval.Email.Get())
|
||||
}
|
||||
}()
|
||||
if err := _main(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user