|
@@ -99,6 +99,32 @@ class SchedulingV3:
|
|
|
else:
|
|
|
mode = mode
|
|
|
|
|
|
+ if spider_name == "run_gongzhonghao1_author_scheduling":
|
|
|
+ cmd = 'ps -ef | grep "run_gongzhonghao1_author_scheduling" | grep -v "grep"'
|
|
|
+ result1 = os.popen(cmd).read()
|
|
|
+ if len(result1) != 0:
|
|
|
+ return
|
|
|
+ if spider_name == "run_gongzhonghao2_author_scheduling":
|
|
|
+ cmd = 'ps -ef | grep "run_gongzhonghao2_author_scheduling" | grep -v "grep"'
|
|
|
+ result2 = os.popen(cmd).read()
|
|
|
+ if len(result2) != 0:
|
|
|
+ return
|
|
|
+ if spider_name == "run_gongzhonghao3_author_scheduling":
|
|
|
+ cmd = 'ps -ef | grep "run_gongzhonghao3_author_scheduling" | grep -v "grep"'
|
|
|
+ result3 = os.popen(cmd).read()
|
|
|
+ if len(result3) != 0:
|
|
|
+ return
|
|
|
+ if spider_name == "run_gongzhonghao4_author_scheduling":
|
|
|
+ cmd = 'ps -ef | grep "run_gongzhonghao4_author_scheduling" | grep -v "grep"'
|
|
|
+ result4 = os.popen(cmd).read()
|
|
|
+ if len(result4) != 0:
|
|
|
+ return
|
|
|
+ if spider_name == "run_gongzhonghao5_author_scheduling":
|
|
|
+ cmd = 'ps -ef | grep "run_gongzhonghao5_author_scheduling" | grep -v "grep"'
|
|
|
+ result5 = os.popen(cmd).read()
|
|
|
+ if len(result5) != 0:
|
|
|
+ return
|
|
|
+
|
|
|
# 正式环境,调度任务
|
|
|
Common.logger(log_type, crawler).info(f"开始调度任务")
|
|
|
task_str = [
|