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

Method heartbeat

coderd/provisionerdserver/provisionerdserver.go:314–321  ·  view source on GitHub ↗

heartbeat updates the last seen at timestamp in the database. If HeartbeatFn is set, it will be called instead.

(ctx context.Context)

Source from the content-addressed store, hash-verified

312// heartbeat updates the last seen at timestamp in the database.
313// If HeartbeatFn is set, it will be called instead.
314func (s *server) heartbeat(ctx context.Context) error {
315 select {
316 case <-ctx.Done():
317 return nil
318 default:
319 return s.heartbeatFn(ctx)
320 }
321}
322
323func (s *server) defaultHeartbeat(ctx context.Context) error {
324 //nolint:gocritic // This is specifically for updating the last seen at timestamp.

Callers 1

heartbeatLoopMethod · 0.95

Calls 1

DoneMethod · 0.45

Tested by

no test coverage detected