mirror of
https://github.com/documize/community.git
synced 2025-07-19 21:29:42 +02:00
Remove redundant logging dependency
This commit is contained in:
parent
bc28b36627
commit
659eb99c0f
1 changed files with 2 additions and 3 deletions
|
@ -14,10 +14,9 @@ package osutil
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/documize/community/core/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var errTimeout = errors.New("conversion timelimit exceeded")
|
var errTimeout = errors.New("conversion timelimit exceeded")
|
||||||
|
@ -39,7 +38,7 @@ func CommandWithTimeout(command *exec.Cmd, timeout time.Duration) ([]byte, error
|
||||||
select {
|
select {
|
||||||
case <-time.After(timeout):
|
case <-time.After(timeout):
|
||||||
if err := command.Process.Kill(); err != nil {
|
if err := command.Process.Kill(); err != nil {
|
||||||
log.Error("failed to kill: ", err)
|
fmt.Errorf("failed to kill: ", err)
|
||||||
}
|
}
|
||||||
<-done // prevent memory leak
|
<-done // prevent memory leak
|
||||||
//fmt.Println("DEBUG timeout")
|
//fmt.Println("DEBUG timeout")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue