diff --git a/PriceSystem/fangjia/__init__.py b/PriceSystem/fangjia/__init__.py index 6867b9d..276f69e 100644 --- a/PriceSystem/fangjia/__init__.py +++ b/PriceSystem/fangjia/__init__.py @@ -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: diff --git a/PriceSystem/test.py b/PriceSystem/test.py index e37f9e9..18091f9 100644 --- a/PriceSystem/test.py +++ b/PriceSystem/test.py @@ -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)