agent/engine/dockerstate/docker_task_engine_state.go
func (state *DockerTaskEngineState) removeIDToContainerTaskUnsafe(container *apicontainer.DockerContainer) {
	// The key to these maps is either the Docker ID or agent-generated name.  We use the agent-generated name
	// before a Docker ID is available.
	key := container.DockerID
	if key == "" {
		key = container.DockerName
	}
	delete(state.idToTask, key)
	delete(state.idToContainer, key)
}
func (state *DockerTaskEngineState) removeIDToContainerTaskUnsafe(container *apicontainer.DockerContainer) {
	// The key to these maps is either the Docker ID or agent-generated name.  We use the agent-generated name
	// before a Docker ID is available.
	key := container.DockerID
	if key == "" {
		key = container.DockerName
	}
	delete(state.idToTask, key)
	delete(state.idToContainer, key)
}
// removeIDToContainerTaskUnsafe removes the container from the idToContainer and idToTask maps.  They key to the maps
// is either the Docker-generated ID or the agent-generated name (if the ID is not available).  This function assumes
// that the ID takes precedence and will delete by the ID when the ID is available.