Rename resourceContainer.cleanup() to executorCleanup()

Not to be confused with the imminent ClientCleanup().
This commit is contained in:
Sean Chittenden 2016-07-09 23:25:33 -07:00
parent 5f8f0a50ac
commit 5dbc0bf382
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
3 changed files with 4 additions and 4 deletions

View File

@ -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)
}
}

View File

@ -9,7 +9,7 @@ import (
type resourceContainer struct {
}
func (rc *resourceContainer) cleanup() error {
func (rc *resourceContainer) executorCleanup() error {
return nil
}

View File

@ -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 {