MCPcopy
hub / github.com/coder/mux / markReadyIfRepoPresent

Method markReadyIfRepoPresent

src/node/runtime/CoderSSHRuntime.ts:152–166  ·  view source on GitHub ↗
(
    workspaceName: string,
    options: EnsureReadyOptions | undefined,
    emitStatus: (phase: RuntimeStatusEvent["phase"], detail?: string) => void
  )

Source from the content-addressed store, hash-verified

150 }
151
152 private async markReadyIfRepoPresent(
153 workspaceName: string,
154 options: EnsureReadyOptions | undefined,
155 emitStatus: (phase: RuntimeStatusEvent["phase"], detail?: string) => void
156 ): Promise<EnsureReadyResult> {
157 const repoCheck = await this.checkWorkspaceRepo(options);
158 if (repoCheck && !repoCheck.ready) {
159 emitStatus("error", repoCheck.error);
160 return repoCheck;
161 }
162
163 this.markActivity(workspaceName);
164 emitStatus("ready");
165 return { ready: true };
166 }
167
168 private isStoppingOrCanceling(status: WorkspaceStatusResult): boolean {
169 return status.kind === "ok" && (status.status === "stopping" || status.status === "canceling");

Callers 1

doEnsureReadyMethod · 0.95

Calls 2

markActivityMethod · 0.95
checkWorkspaceRepoMethod · 0.80

Tested by

no test coverage detected