Refactor Nomad Event Stream log message.
This commit is contained in:

committed by
Sebastian Serth

parent
13a9da95e5
commit
13cd19ed58
@ -129,7 +129,7 @@ func (m *NomadRunnerManager) keepRunnersSynced(ctx context.Context) {
|
|||||||
err := m.apiClient.WatchEventStream(ctx,
|
err := m.apiClient.WatchEventStream(ctx,
|
||||||
&nomad.AllocationProcessing{OnNew: m.onAllocationAdded, OnDeleted: m.onAllocationStopped})
|
&nomad.AllocationProcessing{OnNew: m.onAllocationAdded, OnDeleted: m.onAllocationStopped})
|
||||||
retries += 1
|
retries += 1
|
||||||
log.WithContext(ctx).WithError(err).Errorf("Stopped updating the runners! Retry %v", retries)
|
log.WithContext(ctx).WithError(err).WithField("count", retries).Errorf("Nomad Event Stream failed! Retrying...")
|
||||||
<-time.After(time.Second)
|
<-time.After(time.Second)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user