Преглед на файлове

ignore the SIGTERM failure

z4yx преди 5 години
родител
ревизия
2ba3a27fa3
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      worker/runner.go

+ 2 - 2
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