diff options
author | Valery Piashchynski <[email protected]> | 2021-10-19 14:48:30 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-19 14:48:30 +0300 |
commit | 5190129d4aa2e785416e556519823f8cb601fe07 (patch) | |
tree | 681efd0269c6e34792e6b5ccf5de948a358207d0 | |
parent | c1c4136e86bf71837c7995ff75d859b4b68f0616 (diff) | |
parent | 02e30f6e2e3ce3991565b0abdd9f83f08f9d30d3 (diff) |
[#831]: refactoring(logger): remove error message on process exit
[#831]: refactoring(logger): remove error message on process exit
-rw-r--r-- | events/worker_events.go | 4 | ||||
-rwxr-xr-x | pool/static_pool.go | 3 | ||||
-rwxr-xr-x | worker_watcher/worker_watcher.go | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/events/worker_events.go b/events/worker_events.go index 39c38e57..6b80df61 100644 --- a/events/worker_events.go +++ b/events/worker_events.go @@ -7,6 +7,8 @@ const ( EventWorkerLog // EventWorkerStderr is the worker standard error output EventWorkerStderr + // EventWorkerWaitExit is the worker exit event + EventWorkerWaitExit ) type W int64 @@ -19,6 +21,8 @@ func (ev W) String() string { return "EventWorkerLog" case EventWorkerStderr: return "EventWorkerStderr" + case EventWorkerWaitExit: + return "EventWorkerWaitExit" } return UnknownEventType } diff --git a/pool/static_pool.go b/pool/static_pool.go index f500f998..91bd1c2c 100755 --- a/pool/static_pool.go +++ b/pool/static_pool.go @@ -202,11 +202,10 @@ func (sp *StaticPool) execWithTTL(ctx context.Context, p *payload.Payload) (*pay } func (sp *StaticPool) stopWorker(w worker.BaseProcess) { - const op = errors.Op("static_pool_stop_worker") w.State().Set(worker.StateInvalid) err := w.Stop() if err != nil { - sp.events.Push(events.WorkerEvent{Event: events.EventWorkerError, Worker: w, Payload: errors.E(op, err)}) + sp.events.Push(events.WorkerEvent{Event: events.EventWorkerError, Worker: w, Payload: err}) } } diff --git a/worker_watcher/worker_watcher.go b/worker_watcher/worker_watcher.go index 73a6cf1d..175972e0 100755 --- a/worker_watcher/worker_watcher.go +++ b/worker_watcher/worker_watcher.go @@ -279,9 +279,8 @@ func (ww *workerWatcher) wait(w worker.BaseProcess) { err := w.Wait() if err != nil { ww.events.Push(events.WorkerEvent{ - Event: events.EventWorkerError, - Worker: w, - Payload: errors.E(op, err), + Event: events.EventWorkerWaitExit, + Payload: err, }) } |