teknologi-umum/semyi

Backend: Retry historical writes if fails

Closed this issue · 0 comments

// TODO: Retry write if it fails
// Write the response to the historical writer
err := m.historicalWriter.Write(MonitorHistorical{
MonitorID: uniqueId,
Status: status,
Latency: response.RequestDuration,
Timestamp: response.Timestamp,
})
if err != nil {
log.Error().Err(err).Msg("failed to write historical data")
}

Historical writes should not be failing. But in any case of high database I/O throughput, this might be possible.