+ NewSeqTask2

This commit is contained in:
gazebo
2019-09-12 17:35:43 +08:00
parent 54a55dcac0
commit 3de6498de4

View File

@@ -19,10 +19,14 @@ type SeqTask struct {
}
func NewSeqTask(taskName string, ctx *jxcontext.Context, worker SeqWorkFunc, stepCount int, params ...interface{}) *SeqTask {
return NewSeqTask2(taskName, ctx, false, worker, stepCount, params...)
}
func NewSeqTask2(taskName string, ctx *jxcontext.Context, isContinueWhenError bool, worker SeqWorkFunc, stepCount int, params ...interface{}) *SeqTask {
task := &SeqTask{
worker: worker,
}
task.Init(1, 1, false, params, taskName, ctx, stepCount, stepCount)
task.Init(1, 1, isContinueWhenError, params, taskName, ctx, stepCount, stepCount)
return task
}