Lint
This commit is contained in:
parent
66cf3156b2
commit
b8268d9a46
|
@ -706,8 +706,8 @@ func (tr *TaskRunner) buildTaskConfig() *drivers.TaskConfig {
|
|||
Resources: &drivers.Resources{
|
||||
NomadResources: taskResources,
|
||||
LinuxResources: &drivers.LinuxResources{
|
||||
MemoryLimitBytes: int64(taskResources.Memory.MemoryMB) * 1024 * 1024,
|
||||
CPUShares: int64(taskResources.Cpu.CpuShares),
|
||||
MemoryLimitBytes: taskResources.Memory.MemoryMB * 1024 * 1024,
|
||||
CPUShares: taskResources.Cpu.CpuShares,
|
||||
PercentTicks: float64(taskResources.Cpu.CpuShares) / float64(tr.clientConfig.Node.NodeResources.Cpu.CpuShares),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -580,7 +580,7 @@ func configureCgroups(cfg *lconfigs.Config, command *ExecCommand) error {
|
|||
|
||||
if mb := command.Resources.NomadResources.Memory.MemoryMB; mb > 0 {
|
||||
// Total amount of memory allowed to consume
|
||||
cfg.Cgroups.Resources.Memory = int64(mb * 1024 * 1024)
|
||||
cfg.Cgroups.Resources.Memory = mb * 1024 * 1024
|
||||
// Disable swap to avoid issues on the machine
|
||||
var memSwappiness uint64
|
||||
cfg.Cgroups.Resources.MemorySwappiness = &memSwappiness
|
||||
|
|
Loading…
Reference in New Issue