mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: make GetWorkspacesEligibleForTransition return less false-positives (#15429)
Relates to https://github.com/coder/coder/issues/15082 The old implementation of `GetWorkspacesEligibleForTransition` returns many workspaces that are not actually eligible for transition. This new implementation reduces this number significantly (at least on our dogfood instance).
This commit is contained in:
@@ -346,7 +346,7 @@ type sqlcQuerier interface {
|
||||
// be used in a WHERE clause.
|
||||
GetWorkspaces(ctx context.Context, arg GetWorkspacesParams) ([]GetWorkspacesRow, error)
|
||||
GetWorkspacesAndAgentsByOwnerID(ctx context.Context, ownerID uuid.UUID) ([]GetWorkspacesAndAgentsByOwnerIDRow, error)
|
||||
GetWorkspacesEligibleForTransition(ctx context.Context, now time.Time) ([]WorkspaceTable, error)
|
||||
GetWorkspacesEligibleForTransition(ctx context.Context, now time.Time) ([]GetWorkspacesEligibleForTransitionRow, error)
|
||||
InsertAPIKey(ctx context.Context, arg InsertAPIKeyParams) (APIKey, error)
|
||||
// We use the organization_id as the id
|
||||
// for simplicity since all users is
|
||||
|
||||
Reference in New Issue
Block a user