From 2ba3a27fa3b400776b5a126b65fce98af661b566 Mon Sep 17 00:00:00 2001 From: z4yx Date: Sun, 6 Sep 2020 19:23:26 +0800 Subject: [PATCH] ignore the SIGTERM failure --- worker/runner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/runner.go b/worker/runner.go index e20da5b..01addcd 100644 --- a/worker/runner.go +++ b/worker/runner.go @@ -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