fix(services): clean up dependent resources during service deletion

This commit is contained in:
2026-05-28 16:13:06 +00:00
parent 7f0c968b5c
commit 966c626d36
9 changed files with 691 additions and 8 deletions
@@ -294,6 +294,14 @@ export class CloudlyAppStoreManager {
.slice(0, 25);
}
public clearOperationsForService(serviceIdArg: string): void {
for (const [operationId, operation] of this.upgradeOperations.entries()) {
if (operation.serviceId === serviceIdArg) {
this.upgradeOperations.delete(operationId);
}
}
}
public async startHostedAppUpgrade(serviceIdArg: string, targetVersionArg: string): Promise<IAppStoreUpgradeOperation> {
const operation = await this.createUpgradeOperation(serviceIdArg, targetVersionArg);
void this.performUpgrade(operation.id).catch(() => {});