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)
| 1187 | // ForceMetricsUpdate forces the metrics collector, if defined, to update its state (we cache the metrics state to |
| 1188 | // reduce load on the database). |
| 1189 | func (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 | |
| 1197 | func (c *StoreReconciler) TrackResourceReplacement(ctx context.Context, workspaceID, buildID uuid.UUID, replacements []*sdkproto.ResourceReplacement) { |
| 1198 | // nolint:gocritic // Necessary to query all the required data. |