diff --git a/components/ws-manager-bridge/src/bridge.ts b/components/ws-manager-bridge/src/bridge.ts index b86278a51d0b28..35211ed5e9b5c7 100644 --- a/components/ws-manager-bridge/src/bridge.ts +++ b/components/ws-manager-bridge/src/bridge.ts @@ -394,11 +394,11 @@ export class WorkspaceManagerBridge implements Disposable { span.setTag("after", JSON.stringify(instance)); + await this.workspaceDB.trace(ctx).storeInstance(instance); + // now notify all prebuild listeners about updates - and update DB if needed await this.prebuildUpdater.updatePrebuiltWorkspace({ span }, userId, status); - await this.workspaceDB.trace(ctx).storeInstance(instance); - // cleanup // important: call this after the DB update if (!!lifecycleHandler) {