From 6256bb0edfacad0fd1cf22b7140f07da672bc7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=B9=B2?= Date: Wed, 7 Mar 2018 10:18:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?;=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20?= =?UTF-8?q?=20PriceSystem/zhuge0118A.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/zhuge0118A.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PriceSystem/zhuge0118A.py b/PriceSystem/zhuge0118A.py index f0a5870..b8effae 100644 --- a/PriceSystem/zhuge0118A.py +++ b/PriceSystem/zhuge0118A.py @@ -345,8 +345,8 @@ def commonprice(ct,rl,p): latitude=lat query1 = {"status":0,"cat":"district", - "lat2":{"$gt":latitude-kkk*10**10/0.86,"$lt":latitude+kkk*10**10/0.86}, - "lng2":{"$gt":longtitude-kkk*10**10,"$lt":longtitude+kkk*10**10}} + "lat2":{"$gt":int(latitude-kkk*10**10/0.86),"$lt":int(latitude+kkk*10**10/0.86)}, + "lng2":{"$gt":int(longtitude-kkk*10**10),"$lt":int(longtitude+kkk*10**10)}} #fields1 = {"lat2":1,"lng2":1, "city":1,"region":1,"cat":1,"name":1} fields1 = {"lat2":1,"lng2":1, "city":1,"region":1, From adda37f1ea9e6635c8eccc3d8e97d3ef282dbe22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=B9=B2?= Date: Wed, 7 Mar 2018 10:30:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20?= =?UTF-8?q?=20PriceSystem/CalcSpeedMonitor.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/CalcSpeedMonitor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PriceSystem/CalcSpeedMonitor.py b/PriceSystem/CalcSpeedMonitor.py index 996b309..62f1778 100644 --- a/PriceSystem/CalcSpeedMonitor.py +++ b/PriceSystem/CalcSpeedMonitor.py @@ -2,9 +2,10 @@ import json import multiprocessing import time import redis +import config QUEUE = "calc_cmd" -redis_pool = redis.ConnectionPool(host='192.168.0.144', port=6379, db=0) +redis_pool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=1) def monitor(pname): @@ -12,7 +13,7 @@ def monitor(pname): while True: pre_counter = client.llen(QUEUE) time.sleep(60) - print(pname + "#####################################:".zfill(100) + str( + print(pname + "#########:".zfill(10) + str( pre_counter - client.llen(QUEUE)) + "/min")