mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
🐛 领取任务超时
This commit is contained in:
parent
373b95a144
commit
2057922783
@ -134,15 +134,12 @@ func run() {
|
||||
}
|
||||
cancel()
|
||||
// 执行 Task
|
||||
timeOutCtx, cancel = context.WithTimeout(context.Background(), networkTimeOut)
|
||||
tasks, err := client.RequestTask(timeOutCtx, monitor.GetHost().PB())
|
||||
tasks, err := client.RequestTask(context.Background(), monitor.GetHost().PB())
|
||||
if err != nil {
|
||||
println("client.RequestTask err: ", err)
|
||||
cancel()
|
||||
retry()
|
||||
continue
|
||||
}
|
||||
cancel()
|
||||
err = receiveTasks(tasks)
|
||||
println("receiveTasks exit to main: ", err)
|
||||
retry()
|
||||
|
Loading…
Reference in New Issue
Block a user