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

Method defaultHeartbeat

coderd/provisionerdserver/provisionerdserver.go:323–329  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

321}
322
323func (s *server) defaultHeartbeat(ctx context.Context) error {
324 //nolint:gocritic // This is specifically for updating the last seen at timestamp.
325 return s.Database.UpdateProvisionerDaemonLastSeenAt(dbauthz.AsSystemRestricted(ctx), database.UpdateProvisionerDaemonLastSeenAtParams{
326 ID: s.ID,
327 LastSeenAt: sql.NullTime{Time: s.timeNow(), Valid: true},
328 })
329}
330
331// AcquireJob queries the database to lock a job.
332//

Callers

nothing calls this directly

Calls 3

timeNowMethod · 0.95
AsSystemRestrictedFunction · 0.92

Tested by

no test coverage detected