cron
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
func Cron() {
|
||||
gocron.Every(10).Minutes().Do(CrawlTGChannel)
|
||||
|
||||
_ = gocron.Every(10).Minutes().Do(CrawlTGChannel)
|
||||
<-gocron.Start()
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ func CrawlTGChannel() {
|
||||
|
||||
num := len(proxies)
|
||||
for i := 0; i < num; i++ {
|
||||
proxies[i].SetName("@tgbotlist_" + strconv.Itoa(rand.Int()))
|
||||
proxies[i].SetName(strconv.Itoa(rand.Int()))
|
||||
}
|
||||
cache.SetProxies(proxies)
|
||||
cache.SetString("clashproxies", provider.Clash{Proxies: proxies}.Provide())
|
||||
|
||||
Reference in New Issue
Block a user