removed implicit task adding

This commit is contained in:
milarin 2023-03-10 22:58:13 +01:00
parent d438d90578
commit ea2554519f

View File

@ -53,8 +53,11 @@ func (v *View[K]) consumeReports(printReports bool) {
}() }()
for status := range v.reportCh { for status := range v.reportCh {
if _, ok := v.taskMap[status.ID]; !ok {
panic(fmt.Sprintf("received report for unknown task (forgot to call View.Add()?): %v", v))
}
v.lastReports[status.ID] = status v.lastReports[status.ID] = status
v.Add(status.ID)
if printReports { if printReports {
v.print() v.print()