Skip to content

Commit

Permalink
update settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
roronoa-dong committed Sep 9, 2019
1 parent ed32527 commit 0c42bb7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 15 additions & 13 deletions Config/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ConfigError(BaseException):

if DB_TYPE == 'SSDB':
DB_HOST = getenv('ssdb_host', '127.0.0.1')
DB_PORT = getenv('ssdb_port', '6379')
DB_PORT = getenv('ssdb_port', '8866')
elif DB_TYPE == 'MONGODB':
DB_HOST = getenv('mongodb_host', '127.0.0.1')
DB_PORT = getenv('mongodb_host', '27017')
Expand All @@ -44,18 +44,20 @@ class ConfigError(BaseException):
# register the proxy getter function

PROXY_GETTER = [
"freeProxyFirst",
"freeProxySecond",
# "freeProxyThird", # 网站已不能访问
"freeProxyFourth",
"freeProxyFifth",
# "freeProxySixth" # 不再提供免费代理
"freeProxySeventh",
# "freeProxyEight",
# "freeProxyNinth",
"freeProxyTen",
"freeProxyEleven",
"freeProxyTwelve",
"freeProxy01",
"freeProxy02",
# "freeProxy03", # 网站已不能访问
"freeProxy04",
"freeProxy05",
# "freeProxy06" # 不再提供免费代理
"freeProxy07",
# "freeProxy08",
# "freeProxy09",
"freeProxy10",
"freeProxy11",
"freeProxy12",
"freeProxy13",
"freeProxy14",
# foreign website, outside the wall
# "freeProxyWallFirst",
# "freeProxyWallSecond",
Expand Down
2 changes: 1 addition & 1 deletion Schedule/ProxyRefreshSchedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def fetchAll():
def run():
scheduler = BackgroundScheduler()
# 不用太快, 网站更新速度比较慢, 太快会加大验证压力, 导致raw_proxy积压
scheduler.add_job(fetchAll, 'interval', minutes=10, id="fetch_proxy")
scheduler.add_job(fetchAll, 'interval', minutes=5, id="fetch_proxy")
scheduler.add_job(batchRefresh, "interval", minutes=1) # 每分钟检查一次
scheduler.start()

Expand Down

0 comments on commit 0c42bb7

Please sign in to comment.