Merge pull request #177 from github/interactive-sup-fix
fixed sup printing heuristic
This commit is contained in:
commit
36a28637f2
@ -986,20 +986,22 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldPrintStatus := false
|
shouldPrintStatus := false
|
||||||
if elapsedSeconds <= 60 {
|
if rule == HeuristicPrintStatusRule {
|
||||||
shouldPrintStatus = true
|
if elapsedSeconds <= 60 {
|
||||||
} else if etaSeconds <= 60 {
|
shouldPrintStatus = true
|
||||||
shouldPrintStatus = true
|
} else if etaSeconds <= 60 {
|
||||||
} else if etaSeconds <= 180 {
|
shouldPrintStatus = true
|
||||||
shouldPrintStatus = (elapsedSeconds%5 == 0)
|
} else if etaSeconds <= 180 {
|
||||||
} else if elapsedSeconds <= 180 {
|
shouldPrintStatus = (elapsedSeconds%5 == 0)
|
||||||
shouldPrintStatus = (elapsedSeconds%5 == 0)
|
} else if elapsedSeconds <= 180 {
|
||||||
} else if this.migrationContext.TimeSincePointOfInterest().Seconds() <= 60 {
|
shouldPrintStatus = (elapsedSeconds%5 == 0)
|
||||||
shouldPrintStatus = (elapsedSeconds%5 == 0)
|
} else if this.migrationContext.TimeSincePointOfInterest().Seconds() <= 60 {
|
||||||
|
shouldPrintStatus = (elapsedSeconds%5 == 0)
|
||||||
|
} else {
|
||||||
|
shouldPrintStatus = (elapsedSeconds%30 == 0)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
shouldPrintStatus = (elapsedSeconds%30 == 0)
|
// Not heuristic
|
||||||
}
|
|
||||||
if rule == ForcePrintStatusRule || rule == ForcePrintStatusAndHintRule {
|
|
||||||
shouldPrintStatus = true
|
shouldPrintStatus = true
|
||||||
}
|
}
|
||||||
if !shouldPrintStatus {
|
if !shouldPrintStatus {
|
||||||
|
Loading…
Reference in New Issue
Block a user