Skip to content

Commit

Permalink
feat(visualizer): restyle dot rule
Browse files Browse the repository at this point in the history
  • Loading branch information
noneback committed Oct 16, 2024
1 parent 90ba7ce commit 024d361
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 120 deletions.
5 changes: 3 additions & 2 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"runtime/debug"
"sync"
"time"

Expand Down Expand Up @@ -86,8 +87,8 @@ func (e *ExecutorImpl) invokeNode(ctx *context.Context, node *Node, parentSpan *
span.end = time.Now()
span.extra.success = true
if r := recover(); r != nil {
fmt.Println("node", node.name, "recovered ", r)
node.g.canceled.Store(true)
fmt.Println("[recovered] node", node.name, "panic:", r, debug.Stack())
} else {
e.profiler.AddSpan(&span) // remove canceled node span
}
Expand Down Expand Up @@ -116,7 +117,7 @@ func (e *ExecutorImpl) invokeNode(ctx *context.Context, node *Node, parentSpan *
span.end = time.Now()
span.extra.success = true
if r := recover(); r != nil {
fmt.Println("subflow", node.name, "recovered ", r)
fmt.Println("[recovered] subflow", node.name, "panic:", r, debug.Stack())
node.g.canceled.Store(true)
p.g.canceled.Store(true)
} else {
Expand Down
1 change: 0 additions & 1 deletion flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type Subflow struct {
func (sf *Subflow) instancelize() (err error) {
defer func() {
if r := recover(); r != nil {
fmt.Println("instancelize may failed or paniced")
err = fmt.Errorf("instancelize may failed or paniced")
}
}()
Expand Down
172 changes: 91 additions & 81 deletions image/dag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 024d361

Please sign in to comment.