wangkun 1 tahun lalu
induk
melakukan
727df2286b

+ 1 - 1
gongzhonghao/gongzhonghao_main/run_gongzhonghao1_author_scheduling.py

@@ -17,7 +17,7 @@ def main(log_type, crawler, task, env):
         cmd = 'ps -ef | grep "run_gongzhonghao1_author_scheduling.py" | grep -v "grep"'
         cmd = 'ps -ef | grep "run_gongzhonghao1_author_scheduling.py" | grep -v "grep"'
         result = os.popen(cmd).read()
         result = os.popen(cmd).read()
         Common.logger(log_type, crawler).info(f"len_result:{len(result)}")
         Common.logger(log_type, crawler).info(f"len_result:{len(result)}")
-        if len(result) != 573:
+        if len(result) > 573:
             Common.logger(log_type, crawler).info("公众号_1抓取未完成,无需启动新进程")
             Common.logger(log_type, crawler).info("公众号_1抓取未完成,无需启动新进程")
             time.sleep(1)
             time.sleep(1)
         else:
         else:

+ 1 - 1
gongzhonghao/gongzhonghao_main/run_gongzhonghao2_author_scheduling.py

@@ -15,7 +15,7 @@ def main(log_type, crawler, task, env):
     while True:
     while True:
         cmd = 'ps -ef | grep "run_gongzhonghao2_author_scheduling.py" | grep -v "grep"'
         cmd = 'ps -ef | grep "run_gongzhonghao2_author_scheduling.py" | grep -v "grep"'
         result = os.popen(cmd).read()
         result = os.popen(cmd).read()
-        if len(result) != 0:
+        if len(result) > 573:
             Common.logger(log_type, crawler).info("公众号_2抓取未完成,无需启动新进程")
             Common.logger(log_type, crawler).info("公众号_2抓取未完成,无需启动新进程")
             time.sleep(1)
             time.sleep(1)
         else:
         else:

+ 1 - 1
gongzhonghao/gongzhonghao_main/run_gongzhonghao3_author_scheduling.py

@@ -15,7 +15,7 @@ def main(log_type, crawler, task, env):
     while True:
     while True:
         cmd = 'ps -ef | grep "run_gongzhonghao3_author_scheduling.py" | grep -v "grep"'
         cmd = 'ps -ef | grep "run_gongzhonghao3_author_scheduling.py" | grep -v "grep"'
         result = os.popen(cmd).read()
         result = os.popen(cmd).read()
-        if len(result) != 0:
+        if len(result) > 573:
             Common.logger(log_type, crawler).info("公众号_3抓取未完成,无需启动新进程")
             Common.logger(log_type, crawler).info("公众号_3抓取未完成,无需启动新进程")
             time.sleep(1)
             time.sleep(1)
         else:
         else:

+ 1 - 1
gongzhonghao/gongzhonghao_main/run_gongzhonghao4_author_scheduling.py

@@ -15,7 +15,7 @@ def main(log_type, crawler, task, env):
     while True:
     while True:
         cmd = 'ps -ef | grep "run_gongzhonghao2_author_scheduling.py" | grep -v "grep"'
         cmd = 'ps -ef | grep "run_gongzhonghao2_author_scheduling.py" | grep -v "grep"'
         result = os.popen(cmd).read()
         result = os.popen(cmd).read()
-        if len(result) != 0:
+        if len(result) > 573:
             Common.logger(log_type, crawler).info("公众号_4抓取未完成,无需启动新进程")
             Common.logger(log_type, crawler).info("公众号_4抓取未完成,无需启动新进程")
             time.sleep(1)
             time.sleep(1)
         else:
         else:

+ 1 - 1
gongzhonghao/gongzhonghao_main/run_gongzhonghao5_author_scheduling.py

@@ -15,7 +15,7 @@ def main(log_type, crawler, task, env):
     while True:
     while True:
         cmd = 'ps -ef | grep "run_gongzhonghao5_author_scheduling.py" | grep -v "grep"'
         cmd = 'ps -ef | grep "run_gongzhonghao5_author_scheduling.py" | grep -v "grep"'
         result = os.popen(cmd).read()
         result = os.popen(cmd).read()
-        if len(result) != 0:
+        if len(result) > 573:
             Common.logger(log_type, crawler).info("公众号_5抓取未完成,无需启动新进程")
             Common.logger(log_type, crawler).info("公众号_5抓取未完成,无需启动新进程")
             time.sleep(1)
             time.sleep(1)
         else:
         else: