修改: PriceSystem/CalcSpeedMonitor.py

修改:     PriceSystem/sell_price/zhuge0118A.py
	修改:     PriceSystem/test.py
	修改:     PriceSystem/zhuge/zhuge_consist.py
This commit is contained in:
罗干
2018-03-08 10:39:31 +08:00
parent 5454aa6757
commit 660090c79b
4 changed files with 19 additions and 58 deletions
+4 -5
View File
@@ -2,19 +2,18 @@ import json
import multiprocessing
import time
import redis
import config
QUEUE = "calc_cmd"
redis_pool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=config.get_redis_db())
redis_pool = redis.ConnectionPool(host='192.168.0.144', port=6379, db=0)
def monitor(pname):
client = redis.Redis(connection_pool=redis_pool)
while True:
pre_counter = client.llen(QUEUE)
time.sleep(60)
print(pname + "##################:".zfill(20) + str(
pre_counter - client.llen(QUEUE)) + "/min")
time.sleep(1)
print(pname + "#####################################:".zfill(100) + str(
pre_counter - client.llen(QUEUE)) + "/s")
def format_cmd(cmd):