mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: refactor agent stats streaming (#5112)
This commit is contained in:
@ -132,7 +132,7 @@ func New(options *Options) *API {
|
||||
options.APIRateLimit = 512
|
||||
}
|
||||
if options.AgentStatsRefreshInterval == 0 {
|
||||
options.AgentStatsRefreshInterval = 10 * time.Minute
|
||||
options.AgentStatsRefreshInterval = 5 * time.Minute
|
||||
}
|
||||
if options.MetricsCacheRefreshInterval == 0 {
|
||||
options.MetricsCacheRefreshInterval = time.Hour
|
||||
@ -493,7 +493,10 @@ func New(options *Options) *API {
|
||||
r.Get("/gitauth", api.workspaceAgentsGitAuth)
|
||||
r.Get("/gitsshkey", api.agentGitSSHKey)
|
||||
r.Get("/coordinate", api.workspaceAgentCoordinate)
|
||||
r.Get("/report-stats", api.workspaceAgentReportStats)
|
||||
r.Post("/report-stats", api.workspaceAgentReportStats)
|
||||
// DEPRECATED in favor of the POST endpoint above.
|
||||
// TODO: remove in January 2023
|
||||
r.Get("/report-stats", api.workspaceAgentReportStatsWebsocket)
|
||||
})
|
||||
r.Route("/{workspaceagent}", func(r chi.Router) {
|
||||
r.Use(
|
||||
|
Reference in New Issue
Block a user