+
Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ func Reload(ctx context.Context, doc *enigma.Doc, global *enigma.Global, silent
// Log progress unless silent flag was passed in to the reload command
if !silent {
reloadDone := make(chan struct{})
loggingDone := make(chan struct{})
ctxWithReservedRequestID, reservedRequestID := doc.WithReservedRequestID(ctx)
go func() {
for {
select {
case <-reloadDone:
logProgress(ctx, global, reservedRequestID, skipTransientLogs)
close(loggingDone)
return
default:
time.Sleep(1000)
Expand All @@ -38,6 +40,7 @@ func Reload(ctx context.Context, doc *enigma.Doc, global *enigma.Global, silent
}()
reloadSuccessful, err = doc.DoReload(ctxWithReservedRequestID, 0, false, false)
close(reloadDone)
<-loggingDone
} else {
reloadSuccessful, err = doc.DoReload(ctx, 0, false, false)
//fetch the progress but do nothing, othwerwise we will get it for the next non silent call
Expand Down
2 changes: 1 addition & 1 deletion test/corectl_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestCorectl(t *testing.T) {
} else {
for _, sub := range tt.expected {
if !strings.Contains(actual, sub) {
t.Fatalf("Output did not contain substring %v", sub)
t.Fatalf("Output did not contain substring '%v'\nReceived:\n%v", sub, actual)
}
}
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载