Skip to content

Commit

Permalink
agent: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
yottahmd committed Aug 22, 2022
1 parent f672ab0 commit 34ee995
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 34ee995

Please sign in to comment.