Skip to content

Commit fdc6c7d

Browse files
author
Laurie T. Malau
committed
dunno
1 parent 028c1b9 commit fdc6c7d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

components/ws-manager-bridge/src/bridge.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ export class WorkspaceManagerBridge implements Disposable {
512512

513513
for (const [instanceId, ri] of runningInstancesIdx.entries()) {
514514
const instance = ri.latestInstance;
515-
// This ensures that the workspace instance is not in a
516-
// non-running phase for longer than the max time
517515
if (
518516
!(
519517
instance.status.phase === "running" ||
@@ -614,11 +612,10 @@ export class WorkspaceManagerBridge implements Disposable {
614612

615613
protected async markWorkspaceInstanceAsStopped(ctx: TraceContext, info: RunningWorkspaceInfo, now: Date) {
616614
const nowISO = now.toISOString();
615+
info.latestInstance.status.phase = "stopped";
617616
info.latestInstance.stoppingTime = nowISO;
618617
info.latestInstance.stoppedTime = nowISO;
619-
info.latestInstance.status.phase = "stopped";
620618
await this.workspaceDB.trace(ctx).storeInstance(info.latestInstance);
621-
622619
await this.messagebus.notifyOnInstanceUpdate(ctx, info.workspace.ownerId, info.latestInstance);
623620
await this.prebuildUpdater.stopPrebuildInstance(ctx, info.latestInstance);
624621
}

0 commit comments

Comments
 (0)