Rename resourceContainer.cleanup() to executorCleanup()
Not to be confused with the imminent ClientCleanup().
This commit is contained in:
parent
5f8f0a50ac
commit
5dbc0bf382
|
@ -454,7 +454,7 @@ func (e *UniversalExecutor) Exit() error {
|
|||
}
|
||||
|
||||
if e.command.ResourceLimits {
|
||||
if err := e.resCon.cleanup(); err != nil {
|
||||
if err := e.resCon.executorCleanup(); err != nil {
|
||||
merr.Errors = append(merr.Errors, err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
type resourceContainer struct {
|
||||
}
|
||||
|
||||
func (rc *resourceContainer) cleanup() error {
|
||||
func (rc *resourceContainer) executorCleanup() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ type resourceContainer struct {
|
|||
cgLock sync.Mutex
|
||||
}
|
||||
|
||||
// cleanup removes this host's Cgroup
|
||||
func (rc *resourceContainer) cleanup() error {
|
||||
// cleanup removes this host's Cgroup from within an Executor's context
|
||||
func (rc *resourceContainer) executorCleanup() error {
|
||||
rc.cgLock.Lock()
|
||||
defer rc.cgLock.Unlock()
|
||||
if err := DestroyCgroup(rc.groups, rc.cgPaths, os.Getpid()); err != nil {
|
||||
|
|
Loading…
Reference in New Issue