cleanup v2

This commit is contained in:
Tim Vaillancourt 2022-07-07 03:22:53 +02:00
parent 0ec555badf
commit 0303031fc2
2 changed files with 3 additions and 3 deletions

View File

@ -811,7 +811,7 @@ func (this *Migrator) initiateInspector() (err error) {
// initiateStatus sets and activates the printStatus() ticker // initiateStatus sets and activates the printStatus() ticker
func (this *Migrator) initiateStatus() { func (this *Migrator) initiateStatus() {
this.printStatus(ForcePrintStatusAndHintRule) this.printStatus(ForcePrintStatusAndHintRule)
ticker := time.NewTicker(1 * time.Second) ticker := time.NewTicker(time.Second)
defer ticker.Stop() defer ticker.Stop()
for { for {
<-ticker.C <-ticker.C
@ -1052,7 +1052,7 @@ func (this *Migrator) initiateStreaming() error {
}() }()
go func() { go func() {
ticker := time.NewTicker(1 * time.Second) ticker := time.NewTicker(time.Second)
defer ticker.Stop() defer ticker.Stop()
for { for {
<-ticker.C <-ticker.C

View File

@ -448,7 +448,7 @@ func (this *Throttler) initiateThrottlerCollection(firstThrottlingCollected chan
this.collectGeneralThrottleMetrics() this.collectGeneralThrottleMetrics()
firstThrottlingCollected <- true firstThrottlingCollected <- true
throttlerMetricsTick := time.NewTicker(1 * time.Second) throttlerMetricsTick := time.NewTicker(time.Second)
defer throttlerMetricsTick.Stop() defer throttlerMetricsTick.Stop()
for { for {
<-throttlerMetricsTick.C <-throttlerMetricsTick.C