diff --git a/agent.go b/agent.go index e9b2c568e..663f8b0ad 100644 --- a/agent.go +++ b/agent.go @@ -121,16 +121,6 @@ func (a *Agent) Kill() { a.scheduler.Signal(a.graph, syscall.SIGKILL, nil, false) } -// Cancel sends signal -1 to all child processes. -func (a *Agent) Cancel() { - log.Printf("Sending -1 signal to running child processes.") - a.scheduler.Cancel(a.graph) - for a.scheduler.Status(a.graph) == scheduler.SchedulerStatus_Running { - time.Sleep(time.Second * 5) - a.scheduler.Cancel(a.graph) - } -} - func (a *Agent) signal(sig os.Signal, allowOverride bool) { log.Printf("Sending %s signal to running child processes.", sig) done := make(chan bool) diff --git a/agent_test.go b/agent_test.go index a552a16cf..d8f1b7944 100644 --- a/agent_test.go +++ b/agent_test.go @@ -94,7 +94,6 @@ func TestDryRun(t *testing.T) { func TestCancelDAG(t *testing.T) { for _, abort := range []func(*Agent){ func(a *Agent) { a.Signal(syscall.SIGTERM) }, - func(a *Agent) { a.Cancel() }, } { a, d := testDAGAsync(t, "agent_sleep.yaml") time.Sleep(time.Millisecond * 100)