changed interval to seconds
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
bandwidth:
|
bandwidth:
|
||||||
min: 2
|
min: 2
|
||||||
max: 45
|
max: 45
|
||||||
step: 2
|
step: 1
|
||||||
interval: 5
|
interval: 30
|
||||||
host: "itsh.dev"
|
host: "itsh.dev"
|
||||||
ppp: 5
|
ppp: 5
|
||||||
conformation_ppp: 30
|
conformation_ppp: 30
|
||||||
|
5
main.go
5
main.go
@@ -23,7 +23,7 @@ type Conf struct {
|
|||||||
Min int `yaml:"min"`
|
Min int `yaml:"min"`
|
||||||
Step int `yaml:"step"`
|
Step int `yaml:"step"`
|
||||||
} `yaml:"bandwidth"`
|
} `yaml:"bandwidth"`
|
||||||
Interval float64 `yaml:"interval"`
|
Interval int `yaml:"interval"`
|
||||||
Host string `yaml:"host"`
|
Host string `yaml:"host"`
|
||||||
PPP int `yaml:"ppp"`
|
PPP int `yaml:"ppp"`
|
||||||
ConformationPPP int `yaml:"conformation_ppp"`
|
ConformationPPP int `yaml:"conformation_ppp"`
|
||||||
@@ -171,7 +171,8 @@ func (m UploadManager) pingWorker() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
time.Sleep(time.Duration(conf.Interval) * time.Minute)
|
log.Debugf("sleep for %s", time.Duration(conf.Interval)*time.Second)
|
||||||
|
time.Sleep(time.Duration(conf.Interval) * time.Second)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user