cobweb-launcher 1.2.55__py3-none-any.whl → 1.2.56__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.
- cobweb/db/redis_db.py +5 -5
- cobweb/launchers/launcher_pro.py +2 -3
- cobweb/setting.py +1 -1
- {cobweb_launcher-1.2.55.dist-info → cobweb_launcher-1.2.56.dist-info}/METADATA +1 -1
- {cobweb_launcher-1.2.55.dist-info → cobweb_launcher-1.2.56.dist-info}/RECORD +8 -8
- {cobweb_launcher-1.2.55.dist-info → cobweb_launcher-1.2.56.dist-info}/LICENSE +0 -0
- {cobweb_launcher-1.2.55.dist-info → cobweb_launcher-1.2.56.dist-info}/WHEEL +0 -0
- {cobweb_launcher-1.2.55.dist-info → cobweb_launcher-1.2.56.dist-info}/top_level.txt +0 -0
cobweb/db/redis_db.py
CHANGED
|
@@ -6,11 +6,7 @@ class RedisDB:
|
|
|
6
6
|
|
|
7
7
|
def __init__(self, **kwargs):
|
|
8
8
|
redis_config = kwargs or setting.REDIS_CONFIG
|
|
9
|
-
|
|
10
|
-
self.pool = redis.ConnectionPool(
|
|
11
|
-
max_connections=25,
|
|
12
|
-
**redis_config
|
|
13
|
-
)
|
|
9
|
+
self.pool = redis.ConnectionPool(**redis_config)
|
|
14
10
|
|
|
15
11
|
def get_connection(self):
|
|
16
12
|
return redis.StrictRedis(connection_pool=self.pool)
|
|
@@ -147,6 +143,10 @@ class RedisDB:
|
|
|
147
143
|
members = self.execute_lua(lua_script, [key], _min, _max, start, count, score)
|
|
148
144
|
return [(members[i].decode(), int(members[i + 1])) for i in range(0, len(members), 2)]
|
|
149
145
|
|
|
146
|
+
# def get_member(self):
|
|
147
|
+
# with self.get_connection() as client:
|
|
148
|
+
# pipeline = client.pipeline()
|
|
149
|
+
|
|
150
150
|
def done(self, keys: list, *args) -> list:
|
|
151
151
|
lua_script = """
|
|
152
152
|
for i, member in ipairs(ARGV) do
|
cobweb/launchers/launcher_pro.py
CHANGED
|
@@ -3,8 +3,7 @@ import threading
|
|
|
3
3
|
|
|
4
4
|
from cobweb.db import RedisDB
|
|
5
5
|
from cobweb.base import Seed, logger
|
|
6
|
-
|
|
7
|
-
from cobweb.constant import DealModel, LogTemplate
|
|
6
|
+
from cobweb.constant import LogTemplate
|
|
8
7
|
from .launcher import Launcher, check_pause
|
|
9
8
|
|
|
10
9
|
|
|
@@ -128,7 +127,7 @@ class LauncherPro(Launcher):
|
|
|
128
127
|
refresh_time = int(time.time())
|
|
129
128
|
seeds = {k:-refresh_time - v / 1000 for k, v in self.__DOING__.items()}
|
|
130
129
|
self._db.zadd(self._todo_key, item=seeds, xx=True)
|
|
131
|
-
time.sleep(
|
|
130
|
+
time.sleep(3)
|
|
132
131
|
|
|
133
132
|
@check_pause
|
|
134
133
|
def _delete(self):
|
cobweb/setting.py
CHANGED
|
@@ -42,7 +42,7 @@ TODO_QUEUE_FULL_WAIT_SECONDS = 5 # todo队列已满时等待时间
|
|
|
42
42
|
NEW_QUEUE_WAIT_SECONDS = 30 # new队列等待时间
|
|
43
43
|
DONE_QUEUE_WAIT_SECONDS = 5 # done队列等待时间
|
|
44
44
|
UPLOAD_QUEUE_WAIT_SECONDS = 15 # upload队列等待时间
|
|
45
|
-
SEED_RESET_SECONDS =
|
|
45
|
+
SEED_RESET_SECONDS = 600 # 种子重制时间
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
# Launcher 队列长度
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cobweb/__init__.py,sha256=CBd2oByCfc5EmH2dCZYVHkxXYZG-oWrLyTtZU5sEoP0,96
|
|
2
2
|
cobweb/constant.py,sha256=zy3XYsc1qp2B76_Fn_hVQ8eGHlPBd3OFlZK2cryE6FY,2839
|
|
3
|
-
cobweb/setting.py,sha256=
|
|
3
|
+
cobweb/setting.py,sha256=LlWZeZLVMeCd9NRCPkFDf_DK0IUua1L2U_zYFPJpn_k,2273
|
|
4
4
|
cobweb/base/__init__.py,sha256=4gwWWQ0Q8cYG9cD7Lwf4XMqRGc5M_mapS3IczR6zeCE,222
|
|
5
5
|
cobweb/base/basic.py,sha256=Z56SSLB3I2IGHWCCcSy0Qbfzj8Qbg_po3gP32q1jh4k,7741
|
|
6
6
|
cobweb/base/common_queue.py,sha256=W7PPZZFl52j3Mc916T0imHj7oAUelA6aKJwW-FecDPE,872
|
|
@@ -17,14 +17,14 @@ cobweb/crawlers/crawler.py,sha256=pePDGroD6JJAht5QTU51L7MkFIY4ob9TKpznZ2wUmsw,89
|
|
|
17
17
|
cobweb/crawlers/file_crawler.py,sha256=2Sjbdgxzqd41WykKUQE3QQlGai3T8k-pmHNmPlTchjQ,4454
|
|
18
18
|
cobweb/db/__init__.py,sha256=uZwSkd105EAwYo95oZQXAfofUKHVIAZZIPpNMy-hm2Q,56
|
|
19
19
|
cobweb/db/api_db.py,sha256=bDc5dJQxq4z04h70KUTHd0OqUOEY7Cm3wcNJZtTvJIM,3015
|
|
20
|
-
cobweb/db/redis_db.py,sha256=
|
|
20
|
+
cobweb/db/redis_db.py,sha256=ODV_p00TOQb7hvzR1fxFFOFryPL_VxkezdCcFgVKb0s,5397
|
|
21
21
|
cobweb/exceptions/__init__.py,sha256=E9SHnJBbhD7fOgPFMswqyOf8SKRDrI_i25L0bSpohvk,32
|
|
22
22
|
cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BXApgrOYpA,636
|
|
23
23
|
cobweb/launchers/__init__.py,sha256=qMuVlQcjErVK67HyKFZEsXf_rfZD5ODjx1QucSCKMOM,114
|
|
24
24
|
cobweb/launchers/launcher.py,sha256=y1a72sANV-oJVpy_BI7BwKy7fY4AnpHqJK3t6czoCts,7896
|
|
25
25
|
cobweb/launchers/launcher_air.py,sha256=KAk_M8F3029cXYe7m4nn3Nzyi89lbxJ2cqZjqW8iZ0E,2832
|
|
26
26
|
cobweb/launchers/launcher_api.py,sha256=7K7Kl3dk7Ung9iRBwhiMrALEJywcR66ie5RIkLQEM-Y,7909
|
|
27
|
-
cobweb/launchers/launcher_pro.py,sha256=
|
|
27
|
+
cobweb/launchers/launcher_pro.py,sha256=_KK0KlrzDaQZOdTQJoPZcBsoAiWF13CSbvoepahXIpU,8054
|
|
28
28
|
cobweb/pipelines/__init__.py,sha256=zSUsGtx6smbs2iXBXvYynReKSgky-3gjqaAtKVnA_OU,105
|
|
29
29
|
cobweb/pipelines/pipeline.py,sha256=4TJLX0sUHRxYndF5A4Vs5btUGI-wigkOcFvhTW1hLXI,2009
|
|
30
30
|
cobweb/pipelines/pipeline_console.py,sha256=NEh-4zhuVAQOqwXLsqeb-rcNZ9_KXFUpL3otUTL5qBs,754
|
|
@@ -37,8 +37,8 @@ cobweb/utils/bloom.py,sha256=vng-YbKgh9HbtpAWYf_nkUSbfVTOj40aqUUejRYlsCU,1752
|
|
|
37
37
|
cobweb/utils/dotting.py,sha256=mVICaa26R-dQ4JGmPK-kkR6QjX38QiRewXZnGb2DCIc,1784
|
|
38
38
|
cobweb/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
|
|
39
39
|
cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
|
|
40
|
-
cobweb_launcher-1.2.
|
|
41
|
-
cobweb_launcher-1.2.
|
|
42
|
-
cobweb_launcher-1.2.
|
|
43
|
-
cobweb_launcher-1.2.
|
|
44
|
-
cobweb_launcher-1.2.
|
|
40
|
+
cobweb_launcher-1.2.56.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
41
|
+
cobweb_launcher-1.2.56.dist-info/METADATA,sha256=vMZOi2X8HJQHxiaTroTzoLl6HNT95-bq5BpiS9o6nNM,6510
|
|
42
|
+
cobweb_launcher-1.2.56.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
43
|
+
cobweb_launcher-1.2.56.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
|
44
|
+
cobweb_launcher-1.2.56.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|