Skip to content

Commit 1a36776

Browse files
authored
Merge pull request #4512 from fuweid/14-cherry-pick-4486
[release/1.4] tasks: Monitor v2 tasks in initFunc as well
2 parents 12f20c9 + a1289d6 commit 1a36776

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

services/tasks/local.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ func initFunc(ic *plugin.InitContext) (interface{}, error) {
118118
l.monitor.Monitor(t)
119119
}
120120
}
121+
v2Tasks, err := l.v2Runtime.Tasks(ic.Context, true)
122+
if err != nil {
123+
return nil, err
124+
}
125+
for _, t := range v2Tasks {
126+
l.monitor.Monitor(t)
127+
}
121128
return l, nil
122129
}
123130

0 commit comments

Comments
 (0)