We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 597bc72 commit 24e26d0Copy full SHA for 24e26d0
src/main/kotlin/com/coder/gateway/sdk/CoderRestClient.kt
@@ -175,7 +175,10 @@ open class CoderRestClient(
175
// It is possible for there to be resources with duplicate names so we
176
// need to use a set.
177
return workspaces.flatMap { ws ->
178
- ws.latestBuild.resources.ifEmpty { resources(ws) }.filter { it.agents != null }.flatMap { it.agents!! }.map {
+ when (ws.latestBuild.status) {
179
+ WorkspaceStatus.RUNNING -> ws.latestBuild.resources
180
+ else -> resources(ws)
181
+ }.filter { it.agents != null }.flatMap { it.agents!! }.map {
182
ws to it
183
}
184
}.toSet()
0 commit comments