Comments (5)
这样会不会导致数据库中的ip有的会过期
from proxypool.
这个操作会10分钟进行一次,即10分钟会Fetch一次,网站上的数据。再更新到数据库中。如果你有更好的想法,可以提交pr
from proxypool.
我只是有一些地方想不通,不是说你写的不好
数据库会不会有一直更新不到的数据;
我想改成
go func() {
for{
storage.CheckProxyDB()
}
}()
还有一点不太明白:在CheckIP的时候有更新,为什么还要在添加,难道更新的时候数据如果不存在不会插入吗?
from proxypool.
我只是有一些地方想不通,不是说你写的不好
数据库会不会有一直更新不到的数据;
我想改成go func() { for{ storage.CheckProxyDB() } }()还有一点不太明白:在CheckIP的时候有更新,为什么还要在添加,难道更新的时候数据如果不存在不会插入吗?
即当原来数据库中数据不存在的时候,是会插入的,如果存在就会考虑更新数据库。
可能会存在一些逻辑问题的,你可以尝试修复一下。现在我测试上也存在一些问题,部分数据无法更新到,所以对mysql的表进行了限制,即ip字段进行了unique限制,即每个ip:port只能插入一次。。。
参考行号 https://github.com/henson/proxypool/blob/master/pkg/models/ip.go#L11
from proxypool.
好的,明白了。谢谢解答疑惑^_^
from proxypool.
Related Issues (20)
- go get 时候报错 undefined: clog.CONSOLE HOT 3
- 强烈建议贴出依赖库的版本号~~
- 都用go了,直接把代理功能加上不更好么? HOT 1
- /v2/ip 各种空指针 HOT 2
- Phantomjs用Docker装了可以用么? HOT 2
- http://ip138.com HOT 5
- 程序能运行,但数据库一直没数据 HOT 3
- 数据库没有数据,访问端口也不出来数据 HOT 1
- 一点建议 HOT 1
- 这里有个拼写错误 HOT 1
- bug ?
- Additional Proxy Source
- clog维护不行 建议移除这个依赖
- 博主有联系方式吗?想谈合作~
- 能不能把sqlite驱动换成纯go的,cgo版本的驱动编译比较慢,而且交叉编译会比较麻烦 HOT 1
- 替换htmlquery版本
- htmlquery.Find应该要处理返回的err参数,现在的处理方式可能会导致null pointer错误
- 源码运行 no logger is available HOT 2
- 请求商务推广合作
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxypool.