This commit is contained in:
zu1k
2020-09-05 10:40:30 +08:00
parent 9eca907b88
commit 0d7c58716e
2 changed files with 5 additions and 3 deletions

View File

@@ -33,7 +33,6 @@ func CrawlGo() {
}
// 节点去重
proxies = proxies.Deduplication()
database.SaveProxyList(proxies)
log.Println("CrawlGo node count:", len(proxies))
proxies = provider.Clash{
provider.Base{
@@ -44,6 +43,9 @@ func CrawlGo() {
proxies.NameAddCounrty().Sort().NameAddIndex().NameAddTG()
log.Println("Proxy rename DONE!")
// 全节点存储到数据库
database.SaveProxyList(proxies)
cache.SetProxies("allproxies", proxies)
cache.AllProxiesCount = proxies.Len()
log.Println("AllProxiesCount:", cache.AllProxiesCount)

View File

@@ -7,9 +7,9 @@ import (
type Proxy struct {
gorm.Model
proxy.Base
proxy.Base `gorm:"index"`
Link string
Identifier string
Identifier string `gorm:"primaryKey"`
}
func InitTables() {