summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-02-03 14:19:39 +0300
committerGitHub <[email protected]>2021-02-03 14:19:39 +0300
commit250bd2bf520eed0edc590aaea31339da46c6d54d (patch)
tree79095e4cca6b36cd8953d8542e8dd332caa2c892
parent3819bae83f1911034befdf6bcb23602c6479857c (diff)
parent4eb0740ef5a5a940a16346f0ded0c4e9ee893b34 (diff)
Merge pull request #525 from spiral/bug(screen,race)-fix-race-and-workers-stdout-to-screen
bug(screen,race): fix race and workers stdout to screen
-rw-r--r--cmd/cli/reset.go3
-rw-r--r--cmd/cli/root.go2
-rw-r--r--cmd/cli/workers.go2
3 files changed, 4 insertions, 3 deletions
diff --git a/cmd/cli/reset.go b/cmd/cli/reset.go
index a5055a53..40428fe3 100644
--- a/cmd/cli/reset.go
+++ b/cmd/cli/reset.go
@@ -71,7 +71,8 @@ func resetHandler(_ *cobra.Command, args []string) error {
defer bar.Increment()
var done bool
- err = client.Call(Reset, service, &done)
+ cl := client.Go(Reset, service, &done, nil)
+ <-cl.Done
if err != nil {
result <- errors.E(op, err)
return
diff --git a/cmd/cli/root.go b/cmd/cli/root.go
index 6f73aecf..d29e5d3b 100644
--- a/cmd/cli/root.go
+++ b/cmd/cli/root.go
@@ -78,7 +78,7 @@ func init() {
// if debug mode is on - run debug server
if Debug {
- runDebugServer()
+ go runDebugServer()
}
})
}
diff --git a/cmd/cli/workers.go b/cmd/cli/workers.go
index 09642a58..defcb849 100644
--- a/cmd/cli/workers.go
+++ b/cmd/cli/workers.go
@@ -84,11 +84,11 @@ func workersHandler(_ *cobra.Command, args []string) error {
return nil
case <-tt.C:
tm.MoveCursor(1, 1)
+ tm.Flush()
err := showWorkers(plugins, client)
if err != nil {
return errors.E(op, err)
}
- tm.Flush()
}
}
}