调整超时间
This commit is contained in:
parent
ac901a1c69
commit
29c4fba8ac
@ -250,7 +250,7 @@ func (wf *Workflow) executeTask(task *Task) {
|
|||||||
// 设置超时
|
// 设置超时
|
||||||
timeNum := 12 * 60 * time.Minute
|
timeNum := 12 * 60 * time.Minute
|
||||||
if task.Duration > 0 {
|
if task.Duration > 0 {
|
||||||
timeNum = time.Duration(task.Duration) * time.Second
|
timeNum = time.Duration(task.Duration+30) * time.Second
|
||||||
}
|
}
|
||||||
ctx, cancel := context.WithTimeout(task.ctx, timeNum)
|
ctx, cancel := context.WithTimeout(task.ctx, timeNum)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user