mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd/database): add dbrollup service to rollup insights (#12665)
Add `dbrollup` service that runs the `UpsertTemplateUsageStats` query every 5 minutes, on the minute. This allows us to have fairly real-time insights data when viewing "today".
This commit is contained in:
@@ -6,10 +6,9 @@ import "hash/fnv"
|
||||
// change. If locks are deprecated, they should be kept in this list to avoid
|
||||
// reusing the same ID.
|
||||
const (
|
||||
// Keep the unused iota here so we don't need + 1 every time
|
||||
lockIDUnused = iota
|
||||
LockIDDeploymentSetup
|
||||
LockIDDeploymentSetup = iota + 1
|
||||
LockIDEnterpriseDeploymentSetup
|
||||
LockIDDBRollup
|
||||
)
|
||||
|
||||
// GenLockID generates a unique and consistent lock ID from a given string.
|
||||
|
||||
Reference in New Issue
Block a user