Skip to content

Commit ab80dc0

Browse files
committed
awww yiss
1 parent bf85f58 commit ab80dc0

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

coderd/database/queries.sql.go

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/prebuilds.sql

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,18 @@ WITH
100100
ready_agents
101101
AS (
102102
SELECT
103-
workspace_resources.job_id,
103+
latest_prebuilds.job_id,
104104
BOOL_AND(workspace_agents.lifecycle_state = 'ready'::workspace_agent_lifecycle_state)::boolean AS ready
105105
FROM
106-
workspace_resources
107-
JOIN workspace_agents ON
108-
workspace_agents.resource_id = workspace_resources.id
109-
WHERE
110-
workspace_agents.deleted = false
106+
latest_prebuilds
107+
JOIN workspace_resources ON
108+
workspace_resources.job_id = latest_prebuilds.job_id
109+
JOIN workspace_agents ON
110+
workspace_agents.resource_id = workspace_resources.id
111+
WHERE
112+
workspace_agents.deleted = false
111113
GROUP BY
112-
workspace_resources.job_id
114+
latest_prebuilds.job_id
113115
)
114116
SELECT
115117
latest_prebuilds.workspace_id AS id,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy