mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
修改日志获取问题
This commit is contained in:
@@ -23,7 +23,7 @@ func GetLocalLog(logPath string) (fileBytes []byte, err error) {
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
const bufLen = 2 * 1024 * 1024
|
||||
const bufLen = 1 * 1024 * 1024
|
||||
logBuf := make([]byte, bufLen)
|
||||
|
||||
off := int64(0)
|
||||
|
||||
@@ -50,7 +50,7 @@ func GetRemoteLog(task model.Task) (logStr string, err error) {
|
||||
case logStr = <-ch:
|
||||
log.Infof("get remote log")
|
||||
break
|
||||
case <-time.After(5 * time.Second):
|
||||
case <-time.After(30 * time.Second):
|
||||
logStr = "get remote log timeout"
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user