File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type Task struct {
3131 taskRepo repo.ITaskRepo
3232 Task * model.Task
3333 ParentID string
34- CancleWhenTimeout bool
34+ CancelWhenTimeout bool
3535}
3636
3737type SubTask struct {
@@ -44,7 +44,7 @@ type SubTask struct {
4444 Rollback RollbackFunc
4545 Error error
4646 IgnoreErr bool
47- CancleWhenTimeout bool
47+ CancelWhenTimeout bool
4848}
4949
5050const (
@@ -146,7 +146,7 @@ func (s *SubTask) Execute() error {
146146 select {
147147 case <- ctx .Done ():
148148 s .RootTask .Log (i18n .GetWithName ("TaskTimeout" , subTaskName ))
149- if s .CancleWhenTimeout {
149+ if s .CancelWhenTimeout {
150150 return buserr .New (i18n .GetWithName ("TaskTimeout" , subTaskName ))
151151 }
152152 case err = <- done :
@@ -179,7 +179,7 @@ func (t *Task) Execute() error {
179179 var err error
180180 t .Log (i18n .GetWithName ("TaskStart" , t .Name ))
181181 for _ , subTask := range t .SubTasks {
182- subTask .CancleWhenTimeout = t .CancleWhenTimeout
182+ subTask .CancelWhenTimeout = t .CancelWhenTimeout
183183 t .Task .CurrentStep = subTask .StepAlias
184184 t .updateTask (t .Task )
185185 if err = subTask .Execute (); err == nil {
You can’t perform that action at this time.
0 commit comments