소스 검색

更新 'commons/scheduler.py'

olin 2 일 전
부모
커밋
10c503ad05
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      commons/scheduler.py

+ 2 - 0
commons/scheduler.py

@@ -67,6 +67,8 @@ class CrawlerScheduler:
     def start(self):
         """启动调度器"""
         self.set_flag(False)
+        if hasattr(self, 'heartbeat_thread') and self.heartbeat_thread and self.heartbeat_thread.is_alive():
+            return
         self.heartbeat_thread = threading.Thread(
             target=self._heartbeat_reporter,
             daemon=True