cobweb-launcher 1.2.62__py3-none-any.whl → 1.2.63__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.
@@ -49,8 +49,11 @@ class LauncherApi(Launcher):
49
49
  if (self._speed_control and self.__LAUNCHER_QUEUE__["todo"].length and
50
50
  not self._db.auto_incr(self._speed_control_key, t=self._time_window, limit=self._spider_max_count)):
51
51
  expire_time = self._db.ttl(self._speed_control_key)
52
- logger.info(f"Too fast! Please wait {expire_time} seconds...")
53
- time.sleep(expire_time / 2)
52
+ if isinstance(expire_time, int) and expire_time <= -1:
53
+ self._db.delete(self._speed_control_key)
54
+ elif isinstance(expire_time, int):
55
+ logger.info(f"Too fast! Please wait {expire_time} seconds...")
56
+ time.sleep(expire_time / 2)
54
57
  return None
55
58
  seed = self.__LAUNCHER_QUEUE__["todo"].pop()
56
59
  return seed
@@ -47,7 +47,7 @@ class LauncherPro(Launcher):
47
47
  spider_speed = self._db.get(self._speed_control_key)
48
48
  if int(spider_speed or 0) > self._spider_max_count:
49
49
  expire_time = self._db.ttl(self._speed_control_key)
50
- if expire_time <= -1:
50
+ if isinstance(expire_time, int) and expire_time <= -1:
51
51
  self._db.delete(self._speed_control_key)
52
52
  elif isinstance(expire_time, int):
53
53
  logger.info(f"Too fast! Please wait {expire_time} seconds...")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cobweb-launcher
3
- Version: 1.2.62
3
+ Version: 1.2.63
4
4
  Summary: spider_hole
5
5
  Home-page: https://github.com/Juannie-PP/cobweb
6
6
  Author: Juannie-PP
@@ -24,8 +24,8 @@ cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BX
24
24
  cobweb/launchers/__init__.py,sha256=qMuVlQcjErVK67HyKFZEsXf_rfZD5ODjx1QucSCKMOM,114
25
25
  cobweb/launchers/launcher.py,sha256=aR1cnQymjQQUJe-W_dRoQTd9t3Qav9QkLDzeWW7i0xE,7921
26
26
  cobweb/launchers/launcher_air.py,sha256=qdcxq41I9zN5snEpMUUNEQNTtUiZM1Hw_3N9zu4PuAs,3058
27
- cobweb/launchers/launcher_api.py,sha256=RlWuGSb_izevqJBVlyi_D8mlUXMKReTSOHTHHMEn8FE,8453
28
- cobweb/launchers/launcher_pro.py,sha256=Jn5T89eWZafr4wGTllqrXB5IDyZ8G9hiuk7dW3Xl1VA,8395
27
+ cobweb/launchers/launcher_api.py,sha256=bllvBDi2FqPtdcR2mhcdRr7CYwO5GiNVlo1p0gOCHhA,8632
28
+ cobweb/launchers/launcher_pro.py,sha256=o2selUZaHBh_kIs1MUgu-EuueWARV8HqQUg-VoVN5yg,8428
29
29
  cobweb/pipelines/__init__.py,sha256=zSUsGtx6smbs2iXBXvYynReKSgky-3gjqaAtKVnA_OU,105
30
30
  cobweb/pipelines/pipeline.py,sha256=4TJLX0sUHRxYndF5A4Vs5btUGI-wigkOcFvhTW1hLXI,2009
31
31
  cobweb/pipelines/pipeline_console.py,sha256=NEh-4zhuVAQOqwXLsqeb-rcNZ9_KXFUpL3otUTL5qBs,754
@@ -38,8 +38,8 @@ cobweb/utils/bloom.py,sha256=vng-YbKgh9HbtpAWYf_nkUSbfVTOj40aqUUejRYlsCU,1752
38
38
  cobweb/utils/dotting.py,sha256=mVICaa26R-dQ4JGmPK-kkR6QjX38QiRewXZnGb2DCIc,1784
39
39
  cobweb/utils/oss.py,sha256=6x_ugXanh1R-6ZylQzUDQh4OeFZHujhWFCOxbzy53JY,3984
40
40
  cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
41
- cobweb_launcher-1.2.62.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
42
- cobweb_launcher-1.2.62.dist-info/METADATA,sha256=fgQXgBFjxcRQdCLc4m_2qmM11V8QHleCbROVG2dPIFo,6510
43
- cobweb_launcher-1.2.62.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
44
- cobweb_launcher-1.2.62.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
45
- cobweb_launcher-1.2.62.dist-info/RECORD,,
41
+ cobweb_launcher-1.2.63.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
42
+ cobweb_launcher-1.2.63.dist-info/METADATA,sha256=N2ZvAiGMrpAXrCqpjt0IJce5atZzTyCTJkDLoTMzLvQ,6510
43
+ cobweb_launcher-1.2.63.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
44
+ cobweb_launcher-1.2.63.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
45
+ cobweb_launcher-1.2.63.dist-info/RECORD,,