diff options
author | Valery Piashchynski <[email protected]> | 2020-11-27 00:35:15 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-27 00:35:15 +0300 |
commit | fa9a7e319b5ac6d98fd18d1e4986de35fde254e5 (patch) | |
tree | 559908f3a491a15bb4926f79dbfde350ec7d4c40 /pool.go | |
parent | 46ae5dcc22d971b0f909bce23ec8fdef26811ed6 (diff) |
Add new pool event: EventNoFreeWorkers which indicates than RR can't get
worker from the stack during the allowed allocate timeout.
Diffstat (limited to 'pool.go')
-rwxr-xr-x | pool.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -30,6 +30,9 @@ const ( // EventSupervisorError triggered when supervisor can not complete work. EventSupervisorError + // EventNoFreeWorkers triggered when there are no free workers in the stack and timeout for worker allocate elapsed + EventNoFreeWorkers + // todo: EventMaxMemory caused when worker consumes more memory than allowed. EventMaxMemory @@ -60,7 +63,7 @@ type Pool interface { Workers() (workers []WorkerBase) // Remove worker from the pool. - RemoveWorker(ctx context.Context, worker WorkerBase) error + RemoveWorker(worker WorkerBase) error // Destroy all underlying stack (but let them to complete the task). Destroy(ctx context.Context) |