diff --git a/PriceSystem/CalcCmdSender.py b/PriceSystem/CalcCmdSender.py index b639f66..699406b 100644 --- a/PriceSystem/CalcCmdSender.py +++ b/PriceSystem/CalcCmdSender.py @@ -41,7 +41,8 @@ def get_district(city): def has_price(city, region, name): weekend = fangjia.get_weekend() - district_stat = fangjia.get_collection("fangjia", "district_stat", config.get_district_stat_host(), config.get_district_stat_port()) + district_stat = fangjia.get_collection("fangjia", "district_stat", config.get_district_stat_host(), + config.get_district_stat_port()) query = { "city": city, "region": region, @@ -50,6 +51,7 @@ def has_price(city, region, name): } return district_stat.find_one(query) is not None + def send_cmd(seaweed): json_cmd = json.dumps(seaweed, ensure_ascii=False, cls=CJsonEncoder) client.rpush(QUEUE, json_cmd)