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

Method WaitTask

driver/driver.go:674–685  ·  view source on GitHub ↗
(ctx context.Context, taskID string)

Source from the content-addressed store, hash-verified

672}
673
674func (d *Driver) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error) {
675 d.logger.Info("WaitTask", "taskID", taskID)
676 handle, ok := d.tasks.Get(taskID)
677 if !ok {
678 return nil, drivers.ErrTaskNotFound
679 }
680
681 ch := make(chan *drivers.ExitResult)
682 go d.handleWait(ctx, handle, ch)
683
684 return ch, nil
685}
686
687func (d *Driver) handleWait(ctx context.Context, handle *taskHandle, ch chan *drivers.ExitResult) {
688 defer close(ch)

Callers

nothing calls this directly

Calls 2

handleWaitMethod · 0.95
GetMethod · 0.80

Tested by

no test coverage detected