MCPcopy Index your code
hub / github.com/coder/coder / updateInterval

Method updateInterval

enterprise/replicasync/replicasync.go:148–150  ·  view source on GitHub ↗

updateInterval is used to determine a replicas state. If the replica was updated > the time, it's considered healthy. If the replica was updated < the time, it's considered stale.

()

Source from the content-addressed store, hash-verified

146// If the replica was updated > the time, it's considered healthy.
147// If the replica was updated < the time, it's considered stale.
148func (m *Manager) updateInterval() time.Time {
149 return dbtime.Now().Add(-3 * m.options.UpdateInterval)
150}
151
152// loop runs the replica update sequence on an update interval.
153func (m *Manager) loop(ctx context.Context) {

Callers 2

loopMethod · 0.95
syncReplicasMethod · 0.95

Calls 2

NowFunction · 0.92
AddMethod · 0.65

Tested by

no test coverage detected