(
resolved: ResolvedWorkspaceLifecycleTarget,
operation: (lockedResolved: ResolvedWorkspaceLifecycleTarget) => Promise<T>
)
| 6014 | } |
| 6015 | |
| 6016 | private async withWorkspaceLifecycleLock<T>( |
| 6017 | resolved: ResolvedWorkspaceLifecycleTarget, |
| 6018 | operation: (lockedResolved: ResolvedWorkspaceLifecycleTarget) => Promise<T> |
| 6019 | ): Promise<T> { |
| 6020 | return await this.workspaceLifecycleLocks.withLock(resolved.workspaceId, async () => { |
| 6021 | const lockedResolved = { |
| 6022 | ...resolved, |
| 6023 | metadata: await this.findWorkspaceLifecycleMetadata(resolved.workspaceId), |
| 6024 | }; |
| 6025 | return await operation(lockedResolved); |
| 6026 | }); |
| 6027 | } |
| 6028 | |
| 6029 | private async resolveOwnedWorkspaceLifecycleTarget( |
| 6030 | ownerWorkspaceId: string, |
no test coverage detected