diff options
author | Valery Piashchynski <[email protected]> | 2021-01-24 01:24:50 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-24 01:24:50 +0300 |
commit | 00f94201218079cf2ba3ebbddc9095c0ac4804ae (patch) | |
tree | 91fb62dd0c3a78dff2eaf1d0586397a0031682d5 /pkg/worker_watcher/worker_watcher.go | |
parent | e5a93ee2a305c87ab128dfd166e735c6eeb77e43 (diff) |
Update Pool and WorkerWatcher interfaces
Diffstat (limited to 'pkg/worker_watcher/worker_watcher.go')
-rwxr-xr-x | pkg/worker_watcher/worker_watcher.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/worker_watcher/worker_watcher.go b/pkg/worker_watcher/worker_watcher.go index f87bd021..2c3d512d 100755 --- a/pkg/worker_watcher/worker_watcher.go +++ b/pkg/worker_watcher/worker_watcher.go @@ -39,7 +39,7 @@ func (ww *workerWatcher) AddToWatch(workers []worker.SyncWorker) error { return nil } -func (ww *workerWatcher) GetFreeWorker(ctx context.Context) (*worker.SyncWorkerImpl, error) { +func (ww *workerWatcher) GetFreeWorker(ctx context.Context) (worker.SyncWorker, error) { const op = errors.Op("worker_watcher_get_free_worker") // thread safe operation w, stop := ww.stack.Pop() @@ -127,11 +127,11 @@ func (ww *workerWatcher) Destroy(ctx context.Context) { } // Warning, this is O(n) operation, and it will return copy of the actual workers -func (ww *workerWatcher) WorkersList() []*worker.SyncWorkerImpl { +func (ww *workerWatcher) WorkersList() []worker.SyncWorker { return ww.stack.Workers() } -func (ww *workerWatcher) wait(w worker.SyncWorker) { +func (ww *workerWatcher) wait(w worker.BaseProcess) { const op = errors.Op("worker_watcher_wait") err := w.Wait() if err != nil { |