Commit 05c756a0 by 陈森彬

Merge branch 'master' of ssh://119.23.72.7:22611/lic/tas_monitor into dev2

parents 34c195bb b7720fe9
Showing with 3 additions and 3 deletions
...@@ -21,9 +21,9 @@ ichunt_elk = Elasticsearch(host="127.0.0.1", port=9200, timeout=20) ...@@ -21,9 +21,9 @@ ichunt_elk = Elasticsearch(host="127.0.0.1", port=9200, timeout=20)
def get_process_task(task_code): def get_process_task(task_code):
keys = task_redis.keys(task_code + '*') keys = task_redis.keys(task_code + '_*')
keys_len = sum([task_redis.llen(k) for k in keys]) keys_len = sum([task_redis.llen(k) for k in keys])
abnormal_keys = task_redis.keys('abnormal_' + task_code + '*') abnormal_keys = task_redis.keys('abnormal_' + task_code + '_*')
abnormal_keys_len = sum([task_redis.llen(k) for k in abnormal_keys]) abnormal_keys_len = sum([task_redis.llen(k) for k in abnormal_keys])
return keys_len, abnormal_keys_len return keys_len, abnormal_keys_len
......
...@@ -38,7 +38,7 @@ class MySqlOperator: ...@@ -38,7 +38,7 @@ class MySqlOperator:
def update_process(self, p): def update_process(self, p):
with self.db.cursor() as cursor: with self.db.cursor() as cursor:
sql = """ sql = """
UPDATE lie_spider_board SET run_time=%(run_time)s, remain_task=%(remain_task)s, UPDATE lie_spider_board SET run_time=%(run_time)s, remain_task=%(remain_task)s, concurrency=%(concurrency)s,
remain_wrong_task=%(remain_wrong_task)s, wrong_radio=%(wrong_radio)s WHERE unique_code=%(unique_code)s remain_wrong_task=%(remain_wrong_task)s, wrong_radio=%(wrong_radio)s WHERE unique_code=%(unique_code)s
""" """
cursor.execute(sql, p) cursor.execute(sql, p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment