diff options
author | Valery Piashchynski <[email protected]> | 2020-10-26 11:50:12 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-10-26 11:50:12 +0300 |
commit | 9aae9e2009bad07ebdee73e1c6cf56901d07880a (patch) | |
tree | 0ad9537bd438c63719fb83343ab77fc4ab34eb83 /supervisor_pool.go | |
parent | db7695463e85faf3fba6a2767b2dfa6ef916785d (diff) |
Fix linters warnings
Diffstat (limited to 'supervisor_pool.go')
-rwxr-xr-x | supervisor_pool.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/supervisor_pool.go b/supervisor_pool.go index e63b4a59..9d1d2b1e 100755 --- a/supervisor_pool.go +++ b/supervisor_pool.go @@ -2,8 +2,9 @@ package roadrunner import ( "context" - "github.com/spiral/roadrunner/v2/util" "time" + + "github.com/spiral/roadrunner/v2/util" ) const MB = 1024 * 1024 @@ -83,8 +84,6 @@ func (sp *supervisedPool) control() { } if sp.cfg.MaxWorkerMemory != 0 && s.MemoryUsage >= sp.cfg.MaxWorkerMemory*MB { - // TODO events - //sp.pool.Events() <- PoolEvent{Payload: fmt.Errorf("max allowed memory reached (%vMB)", sp.maxWorkerMemory)} err = sp.pool.RemoveWorker(ctx, workers[i]) if err != nil { sp.events.Push(PoolEvent{Event: EventSupervisorError, Payload: err}) @@ -127,13 +126,5 @@ func (sp *supervisedPool) control() { } } } - - // the very last step is to calculate pool memory usage (except excluded workers) - //totalUsedMemory += s.MemoryUsage } - - //// if current usage more than max allowed pool memory usage - //if totalUsedMemory > sp.maxPoolMemory { - // sp.pool.Destroy(ctx) - //} } |