root 3 سال پیش
والد
کامیت
819f4d38b8
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/build_monitor/redis_monitor.py

+ 2 - 2
src/build_monitor/redis_monitor.py

@@ -15,7 +15,7 @@ from src.utils.comm_tools import shell_cmd
 def _has_redis():
     is_redis = False
     for proc in psutil.process_iter(['pid', 'name']):
-        if proc.name == 'redis-server':
+        if proc.name() == 'redis-server':
             is_redis = True
             break
     return is_redis
@@ -41,7 +41,7 @@ def redis_deamond():
     if not _has_redis():
         _ini_redis()
         _start_redis()
-
+    print('redis 运行成功')
 
 if __name__ == '__main__':
     redis_deamond()