Refactor Nomad Event Stream log message.

This commit is contained in:
Maximilian Paß
2023-08-17 11:00:31 +02:00
committed by Sebastian Serth
parent 13a9da95e5
commit 13cd19ed58

View File

@ -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)
} }
} }