summaryrefslogtreecommitdiff
path: root/pkg/worker_watcher
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-02-16 22:08:50 +0300
committerValery Piashchynski <[email protected]>2021-02-16 22:08:50 +0300
commit8aa3d83f8c9471519a02f7779219238340fb86f8 (patch)
tree1d74b888a3793e3b3ac699913da45a603afe1625 /pkg/worker_watcher
parentbb9dd8d3f46da089217e61efc3f058cfbba5ede3 (diff)
Add support for parsing env variables in the `.rr.yaml` config
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/worker_watcher')
-rwxr-xr-xpkg/worker_watcher/worker_watcher.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/worker_watcher/worker_watcher.go b/pkg/worker_watcher/worker_watcher.go
index 804e4658..cc8cc2b6 100755
--- a/pkg/worker_watcher/worker_watcher.go
+++ b/pkg/worker_watcher/worker_watcher.go
@@ -216,8 +216,8 @@ 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) List() []worker.BaseProcess {
- ww.Lock()
- defer ww.Unlock()
+ ww.RLock()
+ defer ww.RUnlock()
base := make([]worker.BaseProcess, 0, len(ww.workers))
for i := 0; i < len(ww.workers); i++ {