Skip to content

Commit 45645a0

Browse files
Fix typo
1 parent f5568d4 commit 45645a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/app/task/task.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

3737
type 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

5050
const (
@@ -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 {

0 commit comments

Comments
 (0)