stanley-king 3 年之前
父节点
当前提交
95a4c1fca0
共有 2 个文件被更改,包括 27 次插入1 次删除
  1. 26 0
      docker/compose/xyz/stat/docker-compose.yml
  2. 1 1
      plot/SpeedDataCenter.py

+ 26 - 0
docker/compose/xyz/stat/docker-compose.yml

@@ -23,6 +23,32 @@ services:
     container_name: "panda-mchreader"
     command: ['python','mchreader.py', '-h', '172.26.105.125', '-p', '6379']
 
+  speedreader:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /nfs/upload:/var/www/html/data/upload
+      - /mnt/shoplog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "panda-speedreader"
+    command: ['python','speed_reader.py', '-h', '172.26.105.125', '-p', '6379']
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  chspeed:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /nfs/upload:/var/www/html/data/upload
+      - /mnt/shoplog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "panda-chspeed"
+    command: ['python','chspeed.py','-h', '172.26.105.125', '-p', '6379']
+
   ratiosrv:
     image: pycpu:3.7.10
     volumes:

+ 1 - 1
plot/SpeedDataCenter.py

@@ -56,7 +56,7 @@ class SpeedDataCenter(object):
             if len(items) == 5:
                 (chname, quality, card_type, amount, time) = items
                 time = int(time)
-                if latest_time <= time:
+                if time > latest_time:
                     fdel = False
             if fdel:
                 redis.hdel(name, key)