修改算法
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user