Merge pull request #5016 from hashicorp/dani/b-docker-delete-task-on-destroy

docker: Delete Task on Destroy
This commit is contained in:
Danielle Tomlinson 2018-12-18 18:22:36 +01:00 committed by GitHub
commit 0cb8450659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1019,6 +1019,7 @@ func (d *Driver) DestroyTask(taskID string, force bool) error {
}
defer h.dloggerPluginClient.Kill()
if err := h.client.StopContainer(h.containerID, 0); err != nil {
h.logger.Warn("failed to stop container during destroy", "error", err)
}
@ -1033,6 +1034,7 @@ func (d *Driver) DestroyTask(taskID string, force bool) error {
"error", err)
}
d.tasks.Delete(taskID)
return nil
}