The runtime says a state or log operation of a bundle that failed or timed out, with its time (issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -345,6 +345,7 @@ func Start(module, entry string, env []string, mesh Bus, logf func(string, ...an
|
||||
go func(m message) {
|
||||
var result any = map[string]any{}
|
||||
var err error
|
||||
asked := time.Now()
|
||||
switch m.Method {
|
||||
case "mesh/publish":
|
||||
err = mesh.Publish(m.Params)
|
||||
@@ -479,6 +480,13 @@ func Start(module, entry string, env []string, mesh Bus, logf func(string, ...an
|
||||
}
|
||||
return
|
||||
}
|
||||
// A state or log operation the bus refused or let time out reaches a caller as a call that
|
||||
// does not answer: say it here, with how long it took, so the next hang is readable.
|
||||
if err != nil && (strings.HasPrefix(m.Method, "mesh/state.") || strings.HasPrefix(m.Method, "mesh/log.") ||
|
||||
busStateCalls[m.Method]) {
|
||||
logf("[mesh-tools] %s's bundle asked %s and it failed after %s: %v", module, m.Method,
|
||||
time.Since(asked).Round(time.Millisecond), err)
|
||||
}
|
||||
if len(m.ID) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user