mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 09:25:46 +03:00
fix linter errors
This commit is contained in:
@@ -91,7 +91,7 @@ func (tr *TaskRunner) Kill(ctx context.Context, event *structs.TaskEvent) error
|
||||
waitCh, err := handle.WaitCh(ctx)
|
||||
|
||||
// The error should be nil or TaskNotFound, if it's something else then a
|
||||
// failure in the driver or transport layer occured
|
||||
// failure in the driver or transport layer occurred
|
||||
if err != nil {
|
||||
if err == drivers.ErrTaskNotFound {
|
||||
return nil
|
||||
|
||||
@@ -735,7 +735,7 @@ func (tr *TaskRunner) appendEvent(event *structs.TaskEvent) error {
|
||||
// Ensure the event is populated with human readable strings
|
||||
event.PopulateEventDisplayMessage()
|
||||
|
||||
// Propogate failure from event to task state
|
||||
// Propagate failure from event to task state
|
||||
if event.FailsTask {
|
||||
tr.state.Failed = true
|
||||
}
|
||||
|
||||
@@ -462,10 +462,10 @@ func (d *RktDriver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *cs
|
||||
}
|
||||
|
||||
// Add memory isolator
|
||||
prepareArgs = append(prepareArgs, fmt.Sprintf("--memory=%v", int64(cfg.Resources.LinuxResources.MemoryLimitBytes)))
|
||||
prepareArgs = append(prepareArgs, fmt.Sprintf("--memory=%v", cfg.Resources.LinuxResources.MemoryLimitBytes))
|
||||
|
||||
// Add CPU isolator
|
||||
prepareArgs = append(prepareArgs, fmt.Sprintf("--cpu-shares=%v", int64(cfg.Resources.LinuxResources.CPUShares)))
|
||||
prepareArgs = append(prepareArgs, fmt.Sprintf("--cpu-shares=%v", cfg.Resources.LinuxResources.CPUShares))
|
||||
|
||||
// Add DNS servers
|
||||
if len(driverConfig.DNSServers) == 1 && (driverConfig.DNSServers[0] == "host" || driverConfig.DNSServers[0] == "none") {
|
||||
|
||||
Reference in New Issue
Block a user