Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions coderd/metricscache/metricscache.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ import (
// Any non-listed timezone offsets will need to use the closest supported one.
var deploymentTimezoneOffsets = []int{
0, // UTC - is listed first intentionally.
-12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
// Shortened list of 4 timezones that should encompass *most* users. Caching
// all 25 timezones can be too computationally expensive for large
// deployments. This is a stop-gap until more robust fixes can be made for
// the deployment DAUs query.
-6, 3, 6, 10,

// -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
}

// templateTimezoneOffsets are the timezones each template will use for it's DAU
Expand Down
2 changes: 1 addition & 1 deletion codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ when required by your organization's security policy.`,
Flag: "metrics-cache-refresh-interval",
Env: "CODER_METRICS_CACHE_REFRESH_INTERVAL",
Hidden: true,
Default: time.Hour.String(),
Default: (4 * time.Hour).String(),
Value: &c.MetricsCacheRefreshInterval,
Annotations: clibase.Annotations{}.Mark(annotationFormatDuration, "true"),
},
Expand Down