Skip to content

trackbone: fix target result count

Ghost User requested to merge fix-stats into master
trackbone: fix target result count

Given a graph like:

   -> B
 A      -> D
   -> C

When B and C fail or are interrupted, we skip next targets so
D will be skipped twice.

This messes up the stats as we count the target multiple times
and trackbone will never finish because it waits for all targets to
finish based on stats:

func (t Trackbone) hasFinished() bool {
        return t.stats.Total == (t.stats.Succeeded + t.stats.Failed + t.stats.Skipped)
}

With this patch we only record the first skip.
Edited by Ghost User

Merge request reports

Loading