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] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20Pr?= =?UTF-8?q?iceSystem/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")