cobweb-launcher 3.1.17__py3-none-any.whl → 3.1.19__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.
@@ -57,7 +57,7 @@ class Scheduler(ABC, threading.Thread):
57
57
 
58
58
  def set_working_items(self, item_info: dict = None):
59
59
  if not item_info:
60
- return
60
+ return False
61
61
  with self.lock:
62
62
  self.__WORKING_ITEMS__.update(item_info)
63
63
 
@@ -69,7 +69,7 @@ class RedisScheduler(Scheduler):
69
69
 
70
70
  seeds, item_info = list(), dict()
71
71
  for member, priority in members:
72
- seed = Seed(member, priority=priority)
72
+ seed = Seed(member, priority=int(priority % 1000))
73
73
  item_info[seed.to_string] = seed.params.priority
74
74
  seeds.append(seed)
75
75
 
@@ -97,12 +97,12 @@ class RedisScheduler(Scheduler):
97
97
  """
98
98
  刷新doing种子过期时间,防止reset重新消费
99
99
  """
100
- time.sleep(20)
101
100
  if item_info := self.get_working_items():
102
101
  refresh_time = int(time.time())
103
102
  seed_info = {k: -refresh_time - v / 1000 for k, v in item_info.items()}
104
103
  self.db.zadd(self.todo_key, seed_info, xx=True)
105
- self.set_working_items(seed_info)
104
+ # self.set_working_items(seed_info)
105
+ time.sleep(20)
106
106
 
107
107
  @check_pause
108
108
  def delete(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cobweb-launcher
3
- Version: 3.1.17
3
+ Version: 3.1.19
4
4
  Summary: spider_hole
5
5
  Home-page: https://github.com/Juannie-PP/cobweb
6
6
  Author: Juannie-PP
@@ -24,16 +24,16 @@ cobweb/pipelines/pipeline.py,sha256=OgSEZ2DdqofpZcer1Wj1tuBqn8OHVjrYQ5poqt75czQ,
24
24
  cobweb/pipelines/pipeline_csv.py,sha256=TFqxqgVUqkBF6Jott4zd6fvCSxzG67lpafRQtXPw1eg,807
25
25
  cobweb/pipelines/pipeline_loghub.py,sha256=zwIa_pcWBB2UNGd32Cu-i1jKGNruTbo2STdxl1WGwZ0,1829
26
26
  cobweb/schedulers/__init__.py,sha256=LEya11fdAv0X28YzbQTeC1LQZ156Fj4cyEMGqQHUWW0,49
27
- cobweb/schedulers/scheduler.py,sha256=lBN0ZgfZADq3EH_lPdLOxhrgmZ2GCxrZqzdQQT_bdR8,2937
28
- cobweb/schedulers/scheduler_with_redis.py,sha256=d8lG4QZEfS9m4V9QnOqia-I3hZ_2gwM4InOX7BOR3-M,6358
27
+ cobweb/schedulers/scheduler.py,sha256=qb_u3tJELp4zRGOyT8OsNWndKDknhQslnKnjUlwEpiE,2943
28
+ cobweb/schedulers/scheduler_with_redis.py,sha256=4adyaLBZe7-oaAQbCa99a0NDjwcIA3wzxaOqW8GrBrM,6372
29
29
  cobweb/utils/__init__.py,sha256=TRFJyyBjaQH_sejU6G_msOeHpjc3ZXU0dUOO5GQfknM,171
30
30
  cobweb/utils/bloom.py,sha256=A8xqtHXp7jgRoBuUlpovmq8lhU5y7IEF0FOCjfQDb6s,1855
31
31
  cobweb/utils/decorators.py,sha256=ZwVQlz-lYHgXgKf9KRCp15EWPzTDdhoikYUNUCIqNeM,1140
32
32
  cobweb/utils/dotting.py,sha256=L-jGSApdnFIP4jUWH6p5qIme0aJ1vyDrxAx8wOJWvcs,1960
33
33
  cobweb/utils/oss.py,sha256=wmToIIVNO8nCQVRmreVaZejk01aCWS35e1NV6cr0yGI,4192
34
34
  cobweb/utils/tools.py,sha256=14TCedqt07m4z6bCnFAsITOFixeGr8V3aOKk--L7Cr0,879
35
- cobweb_launcher-3.1.17.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
36
- cobweb_launcher-3.1.17.dist-info/METADATA,sha256=vz70vRxivUpOV_beizaVdV3EJQucKbJFdXz6-ntliDg,5998
37
- cobweb_launcher-3.1.17.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
38
- cobweb_launcher-3.1.17.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
39
- cobweb_launcher-3.1.17.dist-info/RECORD,,
35
+ cobweb_launcher-3.1.19.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
36
+ cobweb_launcher-3.1.19.dist-info/METADATA,sha256=yGiXxEUmI_j5vz3KDorlcubne0C6eCLj8VM5O3kr4fw,5998
37
+ cobweb_launcher-3.1.19.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
38
+ cobweb_launcher-3.1.19.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
39
+ cobweb_launcher-3.1.19.dist-info/RECORD,,