Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #463 from bcwaldon/agent-shutdown-order
Browse files Browse the repository at this point in the history
fix(agent): Clear UnitState before unscheduling on shutdown
  • Loading branch information
bcwaldon committed May 15, 2014
2 parents 4db2af9 + 8ab9f88 commit 20cd7e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ func (a *Agent) Purge() {
machID := a.machine.State().ID

for _, jobName := range a.state.ScheduledJobs() {
log.Infof("Unscheduling Job(%s) from local machine", jobName)
a.registry.ClearJobTarget(jobName, machID)
log.Infof("Unloading Job(%s) from local machine", jobName)
a.UnloadJob(jobName)
log.Infof("Unscheduling Job(%s) from local machine", jobName)
a.registry.ClearJobTarget(jobName, machID)
}

// Jobs have been stopped, the heartbeat can stop
Expand Down

0 comments on commit 20cd7e4

Please sign in to comment.