MCPcopy
hub / github.com/go-task/task / splitRegularAndWatchCalls

Method splitRegularAndWatchCalls

task.go:111–125  ·  view source on GitHub ↗
(calls ...*Call)

Source from the content-addressed store, hash-verified

109}
110
111func (e *Executor) splitRegularAndWatchCalls(calls ...*Call) (regularCalls []*Call, watchCalls []*Call, err error) {
112 for _, c := range calls {
113 t, err := e.GetTask(c)
114 if err != nil {
115 return nil, nil, err
116 }
117
118 if e.Watch || t.Watch {
119 watchCalls = append(watchCalls, c)
120 } else {
121 regularCalls = append(regularCalls, c)
122 }
123 }
124 return regularCalls, watchCalls, err
125}
126
127// RunTask runs a task by its name
128func (e *Executor) RunTask(ctx context.Context, call *Call) error {

Callers 1

RunMethod · 0.95

Calls 1

GetTaskMethod · 0.95

Tested by

no test coverage detected