cobweb-launcher 1.2.20__py3-none-any.whl → 1.2.22__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cobweb-launcher might be problematic. Click here for more details.

@@ -46,7 +46,8 @@ class LauncherApi(Launcher):
46
46
  设置时间窗口为self._time_window(秒),判断在该窗口内的采集量是否满足阈值(self._spider_max_speed)
47
47
  :return: True -> 种子, False -> None
48
48
  """
49
- if not self._db.auto_incr(self._speed_control_key, t=self._time_window, limit=self._spider_max_count):
49
+ if (self.__LAUNCHER_QUEUE__["todo"].length and
50
+ not self._db.auto_incr(self._speed_control_key, t=self._time_window, limit=self._spider_max_count)):
50
51
  expire_time = self._db.ttl(self._speed_control_key)
51
52
  logger.info(f"Too fast! Please wait {expire_time} seconds...")
52
53
  time.sleep(expire_time / 2)
@@ -72,11 +73,12 @@ class LauncherApi(Launcher):
72
73
  if self.heartbeat else "-inf"
73
74
 
74
75
  self._db.members(self._todo_key, 0, _min=_min, _max="(0")
75
- self._db.delete(self._reset_lock_key)
76
76
 
77
77
  if not self.heartbeat:
78
78
  self._heartbeat_start_event.set()
79
79
 
80
+ self._db.delete(self._reset_lock_key)
81
+
80
82
  time.sleep(reset_wait_seconds)
81
83
 
82
84
  @check_pause
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cobweb-launcher
3
- Version: 1.2.20
3
+ Version: 1.2.22
4
4
  Summary: spider_hole
5
5
  Home-page: https://github.com/Juannie-PP/cobweb
6
6
  Author: Juannie-PP
@@ -21,7 +21,7 @@ cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BX
21
21
  cobweb/launchers/__init__.py,sha256=qMuVlQcjErVK67HyKFZEsXf_rfZD5ODjx1QucSCKMOM,114
22
22
  cobweb/launchers/launcher.py,sha256=SK4f3Fpuv-QMMriHruXGQ1sh1lxT1DZ2PdG0p2wAzNw,6978
23
23
  cobweb/launchers/launcher_air.py,sha256=KAk_M8F3029cXYe7m4nn3Nzyi89lbxJ2cqZjqW8iZ0E,2832
24
- cobweb/launchers/launcher_api.py,sha256=YyqOt2z3TDVvrcguPhKN5SGRfc7B25KfaYhNNmwtpzc,8577
24
+ cobweb/launchers/launcher_api.py,sha256=idG1PQ9BSF0J9t-xKMjcF7r_-1XmcdlT5jsA8Wkk9k4,8639
25
25
  cobweb/launchers/launcher_pro.py,sha256=2JdN4khAFGBWLXDKaWknjG72XBhfTAnwtrgVmkF0K3M,8653
26
26
  cobweb/pipelines/__init__.py,sha256=zSUsGtx6smbs2iXBXvYynReKSgky-3gjqaAtKVnA_OU,105
27
27
  cobweb/pipelines/base_pipeline.py,sha256=fYnWf79GmhufXpcnMa3te18SbmnVeYLwxfyo-zLd9CY,1577
@@ -33,8 +33,8 @@ cobweb/utils/__init__.py,sha256=vBtZTy3EfRE0MmH43URhmr7nw6_oOWTEbGOM9xR_9o8,78
33
33
  cobweb/utils/bloom.py,sha256=vng-YbKgh9HbtpAWYf_nkUSbfVTOj40aqUUejRYlsCU,1752
34
34
  cobweb/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
35
35
  cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
36
- cobweb_launcher-1.2.20.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
37
- cobweb_launcher-1.2.20.dist-info/METADATA,sha256=4uzzU0B4JmMbwR6U3pdNY8rBQ9m6tzwjUzC_d4iO6k8,6510
38
- cobweb_launcher-1.2.20.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
39
- cobweb_launcher-1.2.20.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
40
- cobweb_launcher-1.2.20.dist-info/RECORD,,
36
+ cobweb_launcher-1.2.22.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
37
+ cobweb_launcher-1.2.22.dist-info/METADATA,sha256=hUtAobkGXQpXaxR2TKP5RAL3iTXWHlhAuwUTFrEk7JI,6510
38
+ cobweb_launcher-1.2.22.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
39
+ cobweb_launcher-1.2.22.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
40
+ cobweb_launcher-1.2.22.dist-info/RECORD,,