diff options
author | Valery Piashchynski <[email protected]> | 2021-01-19 18:10:39 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-19 18:10:39 +0300 |
commit | 0ff05b2732b4fd0783f959c94c54d7e39169f979 (patch) | |
tree | f50aa894ea4e5b402332f7f4a13b8c50ebb09126 /pkg/worker_watcher/worker_watcher.go | |
parent | 75ebbaac89ce8ebc3ab8de47b16e137844cfcd8a (diff) | |
parent | d8e42927b63a0b102ce10d465a10d64bb6c02e22 (diff) |
Merge pull request #487 from spiral/refactor/server_log_messagesv2.0.0-beta9
refactor(errors, logs): Uniform all errors operations, Update server log level of the server log messages
Diffstat (limited to 'pkg/worker_watcher/worker_watcher.go')
-rwxr-xr-x | pkg/worker_watcher/worker_watcher.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/worker_watcher/worker_watcher.go b/pkg/worker_watcher/worker_watcher.go index bf1f2435..b0d39165 100755 --- a/pkg/worker_watcher/worker_watcher.go +++ b/pkg/worker_watcher/worker_watcher.go @@ -40,7 +40,7 @@ func (ww *workerWatcher) AddToWatch(workers []worker.BaseProcess) error { } func (ww *workerWatcher) GetFreeWorker(ctx context.Context) (worker.BaseProcess, error) { - const op = errors.Op("GetFreeWorker") + const op = errors.Op("worker_watcher_get_free_worker") // thread safe operation w, stop := ww.stack.Pop() if stop { @@ -81,7 +81,7 @@ func (ww *workerWatcher) GetFreeWorker(ctx context.Context) (worker.BaseProcess, func (ww *workerWatcher) AllocateNew() error { ww.stack.mutex.Lock() - const op = errors.Op("allocate new worker") + const op = errors.Op("worker_watcher_allocate_new") sw, err := ww.allocator() if err != nil { return errors.E(op, errors.WorkerAllocate, err) @@ -98,7 +98,7 @@ func (ww *workerWatcher) RemoveWorker(wb worker.BaseProcess) error { ww.mutex.Lock() defer ww.mutex.Unlock() - const op = errors.Op("remove worker") + const op = errors.Op("worker_watcher_remove_worker") pid := wb.Pid() if ww.stack.FindAndRemoveByPid(pid) { @@ -132,7 +132,7 @@ func (ww *workerWatcher) WorkersList() []worker.BaseProcess { } func (ww *workerWatcher) wait(w worker.BaseProcess) { - const op = errors.Op("process wait") + const op = errors.Op("worker_watcher_wait") err := w.Wait() if err != nil { ww.events.Push(events.WorkerEvent{ |