Skip to content

Commit 9d4c312

Browse files
committed
Initialize Enqueuer on API startup
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent c5701a6 commit 9d4c312

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

coderd/coderd.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import (
3737
"tailscale.com/util/singleflight"
3838

3939
"cdr.dev/slog"
40+
"github.com/coder/serpent"
41+
4042
agentproto "github.com/coder/coder/v2/agent/proto"
4143
"github.com/coder/coder/v2/buildinfo"
4244
_ "github.com/coder/coder/v2/coderd/apidoc" // Used for swagger docs.
@@ -76,7 +78,6 @@ import (
7678
"github.com/coder/coder/v2/provisionersdk"
7779
"github.com/coder/coder/v2/site"
7880
"github.com/coder/coder/v2/tailnet"
79-
"github.com/coder/serpent"
8081
)
8182

8283
// We must only ever instantiate one httpSwagger.Handler because of a data race
@@ -390,6 +391,10 @@ func New(options *Options) *API {
390391
)
391392
}
392393

394+
if options.NotificationsEnqueuer == nil {
395+
options.NotificationsEnqueuer = notifications.NewNoopEnqueuer()
396+
}
397+
393398
ctx, cancel := context.WithCancel(context.Background())
394399
r := chi.NewRouter()
395400

0 commit comments

Comments
 (0)