Skip to content

Commit

Permalink
app: init resourceFields by default
Browse files Browse the repository at this point in the history
Previously we were gating creation of factories and managers required by
task resources behind the task cpu/memory limits flag. Now we gate the
usage behind feature specific flags that require these dependencies.
  • Loading branch information
adnxn committed Jul 10, 2018
1 parent b31733a commit 4388e84
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions agent/app/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ func (agent *ecsAgent) start() int {
imageManager := engine.NewImageManager(agent.cfg, agent.dockerClient, state)
client := ecsclient.NewECSClient(agent.credentialProvider, agent.cfg, agent.ec2MetadataClient)

if agent.cfg.TaskCPUMemLimit.Enabled() {
agent.initializeResourceFields(credentialsManager)
}
agent.initializeResourceFields(credentialsManager)
return agent.doStart(containerChangeEventStream, credentialsManager, state, imageManager, client)
}

Expand Down

0 comments on commit 4388e84

Please sign in to comment.