Closed wbchn closed 9 years ago
线上Mysql中提供了主从库分别读写,本地环境使用中出错,从库读超时,走读代码发现,dev_server.py中只配置了主库,未设置从库地址,建议修改:
dev_server.py
代码:https://github.com/sinacloud/sae-python-dev-guide/blob/master/dev_server/dev_server.py#L63
https://github.com/sinacloud/sae-python-dev-guide/blob/master/dev_server/dev_server.py#L63
修改diff(我这边不单独提交pull requests了)
sae.const.MYSQL_DB = dbname sae.const.MYSQL_USER = user sae.const.MYSQL_PASS = password sae.const.MYSQL_PORT = port sae.const.MYSQL_HOST = host + sae.const.MYSQL_HOST_S = host
线上Mysql中提供了主从库分别读写,本地环境使用中出错,从库读超时,走读代码发现,
dev_server.py
中只配置了主库,未设置从库地址,建议修改:代码:
https://github.com/sinacloud/sae-python-dev-guide/blob/master/dev_server/dev_server.py#L63
修改diff(我这边不单独提交pull requests了)