Merge pull request #4486 from darfux/monitor_v2_tasks_as_well

tasks: Monitor v2 tasks in initFunc as well
This commit is contained in:
Phil Estes 2020-08-25 10:19:25 -04:00 committed by GitHub
commit 0586589652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,13 @@ func initFunc(ic *plugin.InitContext) (interface{}, error) {
l.monitor.Monitor(t)
}
}
v2Tasks, err := l.v2Runtime.Tasks(ic.Context, true)
if err != nil {
return nil, err
}
for _, t := range v2Tasks {
l.monitor.Monitor(t)
}
return l, nil
}