-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsettings.py
46 lines (40 loc) · 1.22 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from datetime import datetime
import os
def log(s):
print('【%s】 %s' % (datetime.now(), s), flush=True)
if os.environ.get('ENV_REPLACE_API') == 'prod':
log('生产环境')
mysql_server_xxxxx = {
"host": '127.0.0.1',
"user": 'root',
"password": os.environ.get('DB_PASSWORD_xxxxx'),
"db": 'eb_supports_xxxxx',
"port": 3306,
"charset": 'utf8mb4'
}
REDIS_HOST = '127.0.0.1'
REDIS_PORT = '6379'
REDIS_PWD = os.environ.get('REDIS_PWD')
REDIS_DB = 0
NEWS_SCORE_CONF_HASH = 'news_score_conf_hash'
NEWS_SCORE_INITIAL_CONF = 'news_score_initial_conf'
REDIS_EXTRACTOR_QUEUE = 'queue:raw_data'
REDIS_SPIDER_QUEUE = 'queue:spider_data'
else:
log('测试环境')
mysql_server_xxxxx = {
"host": '127.0.0.1',
"user": 'root',
"password": '123456',
"db": 'eb_supports_xxxxx',
"port": 3306,
"charset": 'utf8mb4'
}
REDIS_HOST = '127.0.0.1'
REDIS_PORT = '6379'
REDIS_PWD = 'ayf@ddwfc'
REDIS_DB = 0
NEWS_SCORE_CONF_HASH = 'news_score_conf_hash'
NEWS_SCORE_INITIAL_CONF = 'news_score_initial_conf'
REDIS_EXTRACTOR_QUEUE = 'queue:raw_data'
REDIS_SPIDER_QUEUE = 'queue:spider_data'