Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24e26d0

Browse files
committed
Fetch resources if workspace is off
Turns out resources are not empty for off workspaces, they will havestopped resources, and still not include the agents.
1 parent597bc72 commit24e26d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/main/kotlin/com/coder/gateway/sdk/CoderRestClient.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ open class CoderRestClient(
175175
// It is possible for there to be resources with duplicate names so we
176176
// need to use a set.
177177
return workspaces.flatMap { ws->
178-
ws.latestBuild.resources.ifEmpty { resources(ws) }.filter { it.agents!=null }.flatMap { it.agents!! }.map {
178+
when (ws.latestBuild.status) {
179+
WorkspaceStatus.RUNNING-> ws.latestBuild.resources
180+
else-> resources(ws)
181+
}.filter { it.agents!=null }.flatMap { it.agents!! }.map {
179182
ws to it
180183
}
181184
}.toSet()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp