@@ -898,16 +898,16 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
898
898
899
899
// Manage notifications.
900
900
var (
901
- cfg = options .DeploymentValues .Notifications
901
+ notificationsCfg = options .DeploymentValues .Notifications
902
902
notificationsManager * notifications.Manager
903
903
)
904
904
905
- if cfg .Enabled {
905
+ if notificationsCfg .Enabled {
906
906
metrics := notifications .NewMetrics (options .PrometheusRegistry )
907
907
helpers := templateHelpers (options )
908
908
909
909
// The enqueuer is responsible for enqueueing notifications to the given store.
910
- enqueuer , err := notifications .NewStoreEnqueuer (cfg , options .Database , helpers , logger .Named ("notifications.enqueuer" ), quartz .NewReal ())
910
+ enqueuer , err := notifications .NewStoreEnqueuer (notificationsCfg , options .Database , helpers , logger .Named ("notifications.enqueuer" ), quartz .NewReal ())
911
911
if err != nil {
912
912
return xerrors .Errorf ("failed to instantiate notification store enqueuer: %w" , err )
913
913
}
@@ -916,7 +916,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
916
916
// The notification manager is responsible for:
917
917
// - creating notifiers and managing their lifecycles (notifiers are responsible for dequeueing/sending notifications)
918
918
// - keeping the store updated with status updates
919
- notificationsManager , err = notifications .NewManager (cfg , options .Database , helpers , metrics , logger .Named ("notifications.manager" ))
919
+ notificationsManager , err = notifications .NewManager (notificationsCfg , options .Database , helpers , metrics , logger .Named ("notifications.manager" ))
920
920
if err != nil {
921
921
return xerrors .Errorf ("failed to instantiate notification manager: %w" , err )
922
922
}
0 commit comments