diff options
author | Valery Piashchynski <[email protected]> | 2021-11-02 15:53:48 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-11-02 15:53:48 +0300 |
commit | c1c16ddb8717af5b19f45118e615241ac14a54d6 (patch) | |
tree | deeea0f9ff6ad7f14d446ef283243d4f11b6c4f9 /worker_watcher/worker_watcher.go | |
parent | e4f4c7ac0c47231c220a190eef5db5baf956fbe1 (diff) |
Update events messagesv2.6.0-alpha.4
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'worker_watcher/worker_watcher.go')
-rwxr-xr-x | worker_watcher/worker_watcher.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/worker_watcher/worker_watcher.go b/worker_watcher/worker_watcher.go index d425994e..949958ac 100755 --- a/worker_watcher/worker_watcher.go +++ b/worker_watcher/worker_watcher.go @@ -279,7 +279,7 @@ func (ww *workerWatcher) wait(w worker.BaseProcess) { const op = errors.Op("worker_watcher_wait") err := w.Wait() if err != nil { - ww.events.Send(events.NewEvent(events.EventWorkerWaitExit, wwName, fmt.Sprintf("error: %v", err))) + ww.events.Send(events.NewEvent(events.EventWorkerWaitExit, wwName, fmt.Sprintf("worker stopped, error: %v", err))) } // remove worker @@ -287,7 +287,7 @@ func (ww *workerWatcher) wait(w worker.BaseProcess) { if w.State().Value() == worker.StateDestroyed { // worker was manually destroyed, no need to replace - ww.events.Send(events.NewEvent(events.EventWorkerDestruct, wwName, fmt.Sprintf("pid: %d", w.Pid()))) + ww.events.Send(events.NewEvent(events.EventWorkerDestruct, wwName, fmt.Sprintf("worker destroyed, pid: %d", w.Pid()))) return } @@ -297,11 +297,11 @@ func (ww *workerWatcher) wait(w worker.BaseProcess) { err = ww.Allocate() if err != nil { - ww.events.Send(events.NewEvent(events.EventWorkerProcessExit, wwName, fmt.Sprintf("error: %v", err))) + ww.events.Send(events.NewEvent(events.EventWorkerProcessExit, wwName, fmt.Sprintf("failed to allocate worker, error: %v", err))) // no workers at all, panic if len(ww.workers) == 0 && atomic.LoadUint64(ww.numWorkers) == 0 { - panic(errors.E(op, errors.WorkerAllocate, errors.Errorf("can't allocate workers: %v", err))) + panic(errors.E(op, errors.WorkerAllocate, errors.Errorf("can't allocate workers: %v, no workers in the pool", err))) } } } |