Skip to content

Commit 203812c

Browse files
committed
If a deployment is already deployed, just return the deployment so the request succeeds
1 parent 7445d9b commit 203812c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/webapp/app/v3/services/finalizeDeploymentV2.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ export class FinalizeDeploymentV2Service extends BaseService {
4848
throw new ServiceValidationError("Worker deployment does not have a worker");
4949
}
5050

51+
if (deployment.status === "DEPLOYED") {
52+
logger.debug("Worker deployment is already deployed", { id });
53+
54+
return deployment;
55+
}
56+
5157
if (deployment.status !== "DEPLOYING") {
5258
logger.error("Worker deployment is not in DEPLOYING status", { id });
5359
throw new ServiceValidationError("Worker deployment is not in DEPLOYING status");

0 commit comments

Comments
 (0)