sinacloud / sae-python-dev-guide

SAE Python开发者手册
http://sae.sina.com.cn/doc/python
462 stars 353 forks source link

本地环境缺少MYSQL_HOST_S配置 #135

Closed wbchn closed 9 years ago

wbchn commented 9 years ago

线上Mysql中提供了主从库分别读写,本地环境使用中出错,从库读超时,走读代码发现,dev_server.py中只配置了主库,未设置从库地址,建议修改:

代码: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