Skip to content

Commit

Permalink
ignore the SIGTERM failure
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx committed Sep 6, 2020
1 parent b34238c commit 2ba3a27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ func (c *cmdJob) Terminate() error {
select {
case <-time.After(2 * time.Second):
unix.Kill(c.cmd.Process.Pid, syscall.SIGKILL)
return errors.New("SIGTERM failed to kill the job")
logger.Warningf("SIGTERM failed to kill the job in 2s. SIGKILL sent")
case <-c.finished:
return nil
}
return nil
}

// Copied from go-sh
Expand Down

0 comments on commit 2ba3a27

Please sign in to comment.