MCPcopy Create free account
hub / github.com/araddon/qlbridge / Setup

Method Setup

exec/task_sequential.go:80–101  ·  view source on GitHub ↗
(depth int)

Source from the content-addressed store, hash-verified

78}
79
80func (m *TaskSequential) Setup(depth int) error {
81 // We don't need to setup the First(source) Input channel
82 m.depth = depth
83 m.setup = true
84 for i := 0; i < len(m.runners); i++ {
85 //u.Debugf("%d i:%d Setup: %T p:%p", depth, i, m.runners[i], m.runners[i])
86 if err := m.runners[i].Setup(depth + 1); err != nil {
87 return err
88 }
89 }
90 //u.Infof("%d TaskSequential Setup tasks len=%d", depth, len(m.tasks))
91 for i := 1; i < len(m.runners); i++ {
92 m.runners[i].MessageInSet(m.runners[i-1].MessageOut())
93 //u.Infof("%d-%d setup msgin: %T %p", depth, i, m.runners[i], m.runners[i].MessageIn())
94 }
95 if depth > 0 {
96 m.TaskBase.MessageOutSet(m.runners[len(m.tasks)-1].MessageOut())
97 m.runners[0].MessageInSet(m.TaskBase.MessageIn())
98 }
99 //u.Debugf("setup() %T in:%p out:%p", m, m.msgInCh, m.msgOutCh)
100 return nil
101}
102
103func (m *TaskSequential) Add(task Task) error {
104 if m.setup {

Callers

nothing calls this directly

Calls 5

SetupMethod · 0.65
MessageInSetMethod · 0.65
MessageOutMethod · 0.65
MessageOutSetMethod · 0.65
MessageInMethod · 0.65

Tested by

no test coverage detected