Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Nov 22, 2018
1 parent 53d8464 commit f11ed84
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions dkron/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,23 +625,23 @@ func (a *Agent) RefreshJobStatus(jobName string) {

// If there is pending executions to finish ask if they are really pending.
if len(nodes) > 0 && group != "" {
statuses := a.executionDoneQuery(nodes, group)
statuses := a.executionDoneQuery(nodes, group)

log.WithFields(logrus.Fields{
"statuses": statuses,
}).Debug("agent: Received pending executions response")

for _, ex := range unfinishedExecutions {
if s, ok := statuses[ex.NodeName]; ok {
done, _ := strconv.ParseBool(s)
if done {
log.WithFields(logrus.Fields{
"statuses": statuses,
}).Debug("agent: Received pending executions response")

for _, ex := range unfinishedExecutions {
if s, ok := statuses[ex.NodeName]; ok {
done, _ := strconv.ParseBool(s)
if done {
ex.FinishedAt = time.Now()
a.Store.SetExecution(ex)
}
} else {
ex.FinishedAt = time.Now()
a.Store.SetExecution(ex)
}
} else {
ex.FinishedAt = time.Now()
a.Store.SetExecution(ex)
}
}
}
}

0 comments on commit f11ed84

Please sign in to comment.