Skip to content

Commit

Permalink
reset deploymentSuccess variable in between retries
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Tichák committed Oct 19, 2024
1 parent e619a77 commit 58ddffd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/task/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ func (m *Manager) acquireTasks(envId uid.ID, taskDescriptors Descriptors) (err e
// The request object is used to pass the tasks to deploy and the outcome
// channel to the deployment routine.

// reset variables in between retries
deploymentSuccess = true

outcomeCh := make(chan ResourceOffersOutcome)
m.tasksToDeploy <- &ResourceOffersDeploymentRequest{
tasksToDeploy: tasksToRun,
Expand Down Expand Up @@ -587,6 +590,9 @@ func (m *Manager) acquireTasks(envId uid.ID, taskDescriptors Descriptors) (err e
}
}
break DEPLOYMENT_ATTEMPTS_LOOP
} else {
log.WithField("partition", envId).
Errorf("Attempt number %d/%d failed, but we are retrying...", attemptCount+1, MAX_ATTEMPTS_PER_DEPLOY_REQUEST)
}
}
}
Expand Down

0 comments on commit 58ddffd

Please sign in to comment.