nolint:revive // featureEnabled is a legit control flag.
(featureEnabled bool)
| 1379 | |
| 1380 | // nolint:revive // featureEnabled is a legit control flag. |
| 1381 | func (api *API) setupPrebuilds(featureEnabled bool) (agplprebuilds.ReconciliationOrchestrator, agplprebuilds.Claimer) { |
| 1382 | if !featureEnabled { |
| 1383 | api.Logger.Warn(context.Background(), "prebuilds not enabled; ensure you have a premium license", |
| 1384 | slog.F("feature_enabled", featureEnabled)) |
| 1385 | |
| 1386 | return agplprebuilds.DefaultReconciler, agplprebuilds.DefaultClaimer |
| 1387 | } |
| 1388 | |
| 1389 | reconciler := prebuilds.NewStoreReconciler( |
| 1390 | api.Database, |
| 1391 | api.Pubsub, |
| 1392 | api.AGPL.FileCache, |
| 1393 | api.DeploymentValues.Prebuilds, |
| 1394 | api.Logger.Named("prebuilds"), |
| 1395 | quartz.NewReal(), |
| 1396 | api.PrometheusRegistry, |
| 1397 | api.NotificationsEnqueuer, |
| 1398 | api.AGPL.BuildUsageChecker, |
| 1399 | api.TracerProvider, |
| 1400 | int(api.DeploymentValues.PostgresConnMaxOpen.Value()), |
| 1401 | api.AGPL.WorkspaceBuilderMetrics, |
| 1402 | ) |
| 1403 | return reconciler, prebuilds.NewEnterpriseClaimer() |
| 1404 | } |
no test coverage detected