Skip to content

Commit

Permalink
fix: hang on redeployment
Browse files Browse the repository at this point in the history
fixes: #2655
  • Loading branch information
stuartwdouglas committed Sep 13, 2024
1 parent 8e72149 commit ffa9cac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/controller/dal/dal.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (d *DAL) CreateDeployment(ctx context.Context, language string, moduleSchem
}
defer tx.CommitOrRollback(ctx, &err)

existingDeployment, err := d.checkForExistingDeployments(ctx, tx, moduleSchema, artefacts)
existingDeployment, err := tx.checkForExistingDeployments(ctx, tx, moduleSchema, artefacts)
if err != nil {
return model.DeploymentKey{}, err
} else if !existingDeployment.IsZero() {
Expand Down Expand Up @@ -663,7 +663,7 @@ func (d *DAL) ReplaceDeployment(ctx context.Context, newDeploymentKey model.Depl
if err != nil {
return fmt.Errorf("replace deployment failed to set new deployment replicas from %v to %v: %w", oldDeployment.Key, newDeploymentKey, libdal.TranslatePGError(err))
}
err = d.deploymentWillDeactivate(ctx, oldDeployment.Key)
err = tx.deploymentWillDeactivate(ctx, oldDeployment.Key)
if err != nil {
return fmt.Errorf("replace deployment failed willDeactivate trigger from %v to %v: %w", oldDeployment.Key, newDeploymentKey, libdal.TranslatePGError(err))
}
Expand Down

0 comments on commit ffa9cac

Please sign in to comment.