File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 1
1
import { Api } from "coder/site/src/api/api"
2
- import { ProvisionerJobLog , Workspace , WorkspaceStatus } from "coder/site/src/api/typesGenerated"
2
+ import { ProvisionerJobLog , Workspace } from "coder/site/src/api/typesGenerated"
3
3
import fs from "fs/promises"
4
4
import { ProxyAgent } from "proxy-agent"
5
5
import * as vscode from "vscode"
@@ -117,16 +117,6 @@ export async function startWorkspace(restClient: Api, workspace: Workspace): Pro
117
117
}
118
118
}
119
119
120
- /**
121
- * Get the status of a workspace
122
- * @param restClient Api
123
- * @param workspaceId string
124
- * @returns WorkspaceStatus
125
- */
126
- export async function getWorkspaceStatus ( restClient : Api , workspaceId : string ) : Promise < WorkspaceStatus > {
127
- return ( await restClient . getWorkspace ( workspaceId ) ) . latest_build . status
128
- }
129
-
130
120
/**
131
121
* Wait for the latest build to finish while streaming logs to the emitter.
132
122
*
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import * as path from "path"
10
10
import prettyBytes from "pretty-bytes"
11
11
import * as semver from "semver"
12
12
import * as vscode from "vscode"
13
- import { getWorkspaceStatus , makeCoderSdk , startWorkspace , waitForBuild } from "./api"
13
+ import { makeCoderSdk , startWorkspace , waitForBuild } from "./api"
14
14
import { extractAgents } from "./api-helper"
15
15
import * as cli from "./cliManager"
16
16
import { Commands } from "./commands"
@@ -104,10 +104,8 @@ export class Remote {
104
104
if ( ! ( await this . confirmStart ( workspaceName ) ) ) {
105
105
return undefined
106
106
}
107
- if ( ! [ "running" , "starting" ] . includes ( await getWorkspaceStatus ( restClient , workspace . id ) ) ) {
108
- this . storage . writeToCoderOutputChannel ( `Starting ${ workspaceName } ...` )
109
- workspace = await startWorkspace ( restClient , workspace )
110
- }
107
+ this . storage . writeToCoderOutputChannel ( `Starting ${ workspaceName } ...` )
108
+ workspace = await startWorkspace ( restClient , workspace )
111
109
break
112
110
case "failed" :
113
111
// On a first attempt, we will try starting a failed workspace
You can’t perform that action at this time.
0 commit comments