任务调度后,增加回调触发
This commit is contained in:
parent
1136b75c32
commit
384a975cc7
2
task.go
2
task.go
@ -117,9 +117,11 @@ func (d *dispatch) Run(ctx context.Context, cfg *Config) *Result {
|
||||
}
|
||||
}
|
||||
result.Data, result.Err = taskInstance.Execute(ctx, cfg)
|
||||
_ = taskInstance.Callback(result)
|
||||
}()
|
||||
} else {
|
||||
result.Data, result.Err = taskInstance.Execute(ctx, cfg)
|
||||
_ = taskInstance.Callback(result)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user