mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): disable chat worker in TestPostChatMessagesBusyInterrupt (#26331)
Addresses https://github.com/coder/internal/issues/1584
This commit is contained in:
+7
-1
@@ -258,6 +258,9 @@ type Options struct {
|
||||
// ChatProviderAPIKeys overrides deployment-derived provider keys.
|
||||
// Test harnesses use this to route chat models to local providers.
|
||||
ChatProviderAPIKeys *chatprovider.ProviderAPIKeys
|
||||
// ChatWorkerDisabled skips starting the chat daemon's background
|
||||
// worker.
|
||||
ChatWorkerDisabled bool
|
||||
|
||||
UpdateAgentMetrics func(ctx context.Context, labels prometheusmetrics.AgentMetricLabels, metrics []*agentproto.Stats_Metric)
|
||||
StatsBatcher workspacestats.Batcher
|
||||
@@ -839,7 +842,10 @@ func New(options *Options) *API {
|
||||
OIDCTokenSource: oidcMCPSrc,
|
||||
NotificationsEnqueuer: options.NotificationsEnqueuer,
|
||||
Auditor: &api.Auditor,
|
||||
}).Start()
|
||||
})
|
||||
if !options.ChatWorkerDisabled {
|
||||
api.chatDaemon.Start()
|
||||
}
|
||||
gitSyncLogger := options.Logger.Named("gitsync")
|
||||
refresher := gitsync.NewRefresher(
|
||||
api.resolveGitProvider,
|
||||
|
||||
Reference in New Issue
Block a user