优化代码

This commit is contained in:
2018-04-02 10:38:39 +08:00
parent f4d1c80458
commit 0db1b7f077
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -267,13 +267,13 @@ def find_disanganf_price(query, fields=None):
raise Exception("yang ben cha xun shi bai1")
@timer
def dis_feature(query, fields=None):
# client1 = pymongo.MongoClient('192.168.0.136',27017)
# db1 = client1.fangjia
# dsf = db1.average_statistics
# s = time.time()
seawater105 = get_collection("fangjia_stat", "district_feature", "192.168.0.136", 27017)
seawater105 = get_collection("fangjia_stat", "district_feature", config.get_mongodb_host(), config.get_mongodb_port())
for err_count in range(0, 10):
try:
+5 -5
View File
@@ -34,18 +34,18 @@ rl = '海珠'
lk = '会展世界城三期'
'''
#成都- 都江堰- 溪岭雪#上海徐汇 灞桥沁水新城百汇园西 安 未央 兴乐园 弘和美邻馆 雁塔鸿景花园上海 奉贤 万隆花苑#
ct='深圳'
rl='龙岗'
lk='丽皇阁'
ct='北海'
rl='银海'
lk='汇景公寓'
#成都双流长滩一号 上海 奉贤 朝阳新村##上海 奉贤 棕榈滩别墅深圳龙岗丽皇阁
#未央
weekend = datetime.datetime.strptime("2018-03-25", "%Y-%m-%d")
weekend = datetime.datetime.strptime("2018-04-01", "%Y-%m-%d")
#for i in range(0, 100):
sellPrice.out_put_price(ct, rl, lk, fangjia.get_weekend())
sellPrice.out_put_price(ct, rl, lk, weekend)
e = time.time()
print(e - s)