Skip to content

Commit

Permalink
[update]修改默认失败次数
Browse files Browse the repository at this point in the history
  • Loading branch information
jinghao_wb committed Oct 10, 2017
1 parent 29cda0c commit bc07c05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Schedule/ProxyCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def run(self):
proxy = proxy_item.get('proxy')
counter = proxy_item.get('value')
if validUsefulProxy(proxy):
# 验证通过计数器加1, 计数在-5到1之间
# 验证通过计数器加1
if counter and int(counter) < 1:
self.db.put(proxy, num=int(counter) + 1)
else:
Expand All @@ -48,7 +48,7 @@ def run(self):
else:
self.log.info('ProxyCheck: {} validation fail'.format(proxy))
# 验证失败,计数器减1
if counter and int(counter) < -FAIL_COUNT:
if counter and int(counter) <= -FAIL_COUNT:
self.log.info('ProxyCheck: {} fail too many, delete!'.format(proxy))
self.db.delete(proxy)
else:
Expand Down

0 comments on commit bc07c05

Please sign in to comment.