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

Method ExecTask

driver/driver.go:854–866  ·  view source on GitHub ↗
(taskID string, cmd []string, timeout time.Duration)

Source from the content-addressed store, hash-verified

852}
853
854func (d *Driver) ExecTask(taskID string, cmd []string, timeout time.Duration) (*drivers.ExecTaskResult, error) {
855 d.logger.Info("ExecTask", "id", taskID)
856 h, ok := d.tasks.Get(taskID)
857 if !ok {
858 return nil, drivers.ErrTaskNotFound
859 }
860
861 res := drivers.ExecTaskResult{
862 Stdout: []byte(fmt.Sprintf("Exec(%q, %q)", h.taskConfig.Name, cmd)),
863 ExitResult: &drivers.ExitResult{},
864 }
865 return &res, nil
866}
867
868func (d *Driver) Shutdown() {
869 d.logger.Info("Driver.Shutdown")

Callers

nothing calls this directly

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected