From b5d799d9a7daa8e40a8ba59d8a3be44a5294fe72 Mon Sep 17 00:00:00 2001 From: Yaroslav Grishajev Date: Sat, 14 Dec 2024 09:22:19 +0100 Subject: [PATCH] fix(deployment): skip stale deployment cleanup tx if no found --- .../stale-managed-deployments-cleaner.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/api/src/deployment/services/stale-managed-deployments-cleaner/stale-managed-deployments-cleaner.service.ts b/apps/api/src/deployment/services/stale-managed-deployments-cleaner/stale-managed-deployments-cleaner.service.ts index 4e2e37073..81ee0891f 100644 --- a/apps/api/src/deployment/services/stale-managed-deployments-cleaner/stale-managed-deployments-cleaner.service.ts +++ b/apps/api/src/deployment/services/stale-managed-deployments-cleaner/stale-managed-deployments-cleaner.service.ts @@ -55,6 +55,10 @@ export class StaleManagedDeploymentsCleanerService { const messages = deployments.map(deployment => this.rpcMessageService.getCloseDeploymentMsg(wallet.address, deployment.dseq)); + if (!messages.length) { + return; + } + this.logger.info({ event: "DEPLOYMENT_CLEAN_UP", owner: wallet.address }); try {