From 85931881af41717d198eb662cc7268613a516902 Mon Sep 17 00:00:00 2001 From: Brandon Mikeska Date: Fri, 24 Nov 2023 14:29:23 -0600 Subject: [PATCH] fix(deploy): Honor waitTime for Deploy commands (#1443) Honor deploy command waitTime Instead of hardcoding the deployment result timeout - honor the user's input. --------- Co-authored-by: Azlam <43767972+azlam-abdulsalam@users.noreply.github.com> --- packages/core/src/deployers/DeploySourceToOrgImpl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/deployers/DeploySourceToOrgImpl.ts b/packages/core/src/deployers/DeploySourceToOrgImpl.ts index 2b2c581e7..69810d1f3 100644 --- a/packages/core/src/deployers/DeploySourceToOrgImpl.ts +++ b/packages/core/src/deployers/DeploySourceToOrgImpl.ts @@ -180,7 +180,8 @@ export default class DeploySourceToOrgImpl implements DeploymentExecutor { }); // Wait for polling to finish and get the DeployResult object - const result = await deploy.pollStatus({ frequency: Duration.seconds(30), timeout: Duration.hours(2) }); + const hoursInWaitTime = Number(this.deploymentOptions.waitTime) / 60; + const result = await deploy.pollStatus({ frequency: Duration.seconds(30), timeout: Duration.hours(hoursInWaitTime) }); return result; }