mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Merge pull request #67 from justinmueller05082000/bugfix/replace-timer-with-sleep
Replace timers with sleeps
This commit is contained in:
commit
afbfe16540
2 changed files with 2 additions and 2 deletions
|
|
@ -433,7 +433,7 @@ func flappingHistoryWorker(super *supervisor.Supervisor) {
|
|||
func historyWorker(super *supervisor.Supervisor, historyType string, preparedStatements []string, dataFunctions []func(map[string]interface{}) []interface{}, observer prometheus.Observer) {
|
||||
if super.EnvId == nil {
|
||||
log.Debug(historyType + "History: Waiting for EnvId to be set")
|
||||
<-time.NewTimer(time.Second).C
|
||||
time.Sleep(time.Second)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ func logSyncCounters() {
|
|||
func syncStates(super *supervisor.Supervisor, objectType string) {
|
||||
if super.EnvId == nil {
|
||||
log.Debug("StateSync: Waiting for EnvId to be set")
|
||||
<-time.NewTimer(time.Second).C
|
||||
time.Sleep(time.Second)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue