MCPcopy Create free account
hub / github.com/actiontech/dtle / handleWait

Method handleWait

driver/driver.go:687–698  ·  view source on GitHub ↗
(ctx context.Context, handle *taskHandle, ch chan *drivers.ExitResult)

Source from the content-addressed store, hash-verified

685}
686
687func (d *Driver) handleWait(ctx context.Context, handle *taskHandle, ch chan *drivers.ExitResult) {
688 defer close(ch)
689
690 select {
691 case <-ctx.Done():
692 return
693 case <-d.ctx.Done():
694 return
695 case <-handle.ctx.Done():
696 ch <- handle.GetExitResult()
697 }
698}
699
700// StopTask will not be called if the task has already exited (e.g. onError).
701func (d *Driver) StopTask(taskID string, timeout time.Duration, signal string) error {

Callers 1

WaitTaskMethod · 0.95

Calls 1

GetExitResultMethod · 0.80

Tested by

no test coverage detected