MCPcopy Create free account
hub / github.com/coder/coder / ForceMetricsUpdate

Method ForceMetricsUpdate

enterprise/coderd/prebuilds/reconcile.go:1189–1195  ·  view source on GitHub ↗

ForceMetricsUpdate forces the metrics collector, if defined, to update its state (we cache the metrics state to reduce load on the database).

(ctx context.Context)

Source from the content-addressed store, hash-verified

1187// ForceMetricsUpdate forces the metrics collector, if defined, to update its state (we cache the metrics state to
1188// reduce load on the database).
1189func (c *StoreReconciler) ForceMetricsUpdate(ctx context.Context) error {
1190 if c.metrics == nil {
1191 return nil
1192 }
1193
1194 return c.metrics.UpdateState(ctx, time.Second*10)
1195}
1196
1197func (c *StoreReconciler) TrackResourceReplacement(ctx context.Context, workspaceID, buildID uuid.UUID, replacements []*sdkproto.ResourceReplacement) {
1198 // nolint:gocritic // Necessary to query all the required data.

Calls 1

UpdateStateMethod · 0.80