cobweb-launcher 0.1.13__py3-none-any.whl → 0.1.14__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/__init__.py +1 -0
- cobweb/db/oss_db.py +11 -10
- cobweb/equip/__init__.py +1 -1
- cobweb/equip/single/launcher.py +3 -1
- {cobweb_launcher-0.1.13.dist-info → cobweb_launcher-0.1.14.dist-info}/METADATA +1 -1
- {cobweb_launcher-0.1.13.dist-info → cobweb_launcher-0.1.14.dist-info}/RECORD +9 -9
- {cobweb_launcher-0.1.13.dist-info → cobweb_launcher-0.1.14.dist-info}/LICENSE +0 -0
- {cobweb_launcher-0.1.13.dist-info → cobweb_launcher-0.1.14.dist-info}/WHEEL +0 -0
- {cobweb_launcher-0.1.13.dist-info → cobweb_launcher-0.1.14.dist-info}/top_level.txt +0 -0
cobweb/__init__.py
CHANGED
cobweb/db/oss_db.py
CHANGED
|
@@ -13,8 +13,8 @@ class OssDB:
|
|
|
13
13
|
endpoint,
|
|
14
14
|
access_key,
|
|
15
15
|
secret_key,
|
|
16
|
-
chunk_size,
|
|
17
|
-
min_size
|
|
16
|
+
chunk_size=1024 ** 2,
|
|
17
|
+
min_size=1024
|
|
18
18
|
):
|
|
19
19
|
self.endpoint = endpoint
|
|
20
20
|
self.bucket_name = bucket_name
|
|
@@ -27,8 +27,8 @@ class OssDB:
|
|
|
27
27
|
endpoint=endpoint,
|
|
28
28
|
bucket_name=bucket_name
|
|
29
29
|
)
|
|
30
|
-
self.chunk_size = chunk_size
|
|
31
|
-
self.min_size = min_size
|
|
30
|
+
self.chunk_size = chunk_size
|
|
31
|
+
self.min_size = min_size
|
|
32
32
|
|
|
33
33
|
@staticmethod
|
|
34
34
|
def format_upload_len(length):
|
|
@@ -104,14 +104,15 @@ class OssDB:
|
|
|
104
104
|
f", file size: {format_upload}"
|
|
105
105
|
)
|
|
106
106
|
|
|
107
|
-
else:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
# else:
|
|
108
|
+
# log.info(
|
|
109
|
+
# f"file size smaller than min size! "
|
|
110
|
+
# f"file size: {format_upload}"
|
|
111
|
+
# )
|
|
112
112
|
status = True
|
|
113
113
|
except ValueError as e:
|
|
114
|
-
|
|
114
|
+
pass
|
|
115
|
+
# log.exception(str(e))
|
|
115
116
|
except oss2.exceptions.RequestError as e:
|
|
116
117
|
self.bucket = oss2.Bucket(
|
|
117
118
|
auth=self.auth,
|
cobweb/equip/__init__.py
CHANGED
cobweb/equip/single/launcher.py
CHANGED
|
@@ -2,7 +2,7 @@ import time
|
|
|
2
2
|
import threading
|
|
3
3
|
|
|
4
4
|
from .. import log, sqn, rtn, pim
|
|
5
|
-
from .. import Queue, DBItem, RedisDB, Setting
|
|
5
|
+
from .. import Queue, DBItem, RedisDB, Setting, OssDB
|
|
6
6
|
from .models import Scheduler, Spider, Storer
|
|
7
7
|
|
|
8
8
|
|
|
@@ -81,6 +81,8 @@ def launcher(task):
|
|
|
81
81
|
|
|
82
82
|
# new item
|
|
83
83
|
item = type("Item", (object,), {"redis_client": redis_db.client})()
|
|
84
|
+
if task.oss_config:
|
|
85
|
+
item.oss = OssDB(**task.oss_config)
|
|
84
86
|
|
|
85
87
|
log.info("初始化cobweb!")
|
|
86
88
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cobweb/__init__.py,sha256=
|
|
1
|
+
cobweb/__init__.py,sha256=rd5vkgxe49DzVH4oyvwl-pWQeJrqF1K6XT1NZfvMmTo,256
|
|
2
2
|
cobweb/bbb.py,sha256=zKeCeBVFQfhEv6M8CCktUTM7tXDZmAu6ZN0-ET44pUY,5707
|
|
3
3
|
cobweb/constant.py,sha256=t0_2xY_VU6T18DnD8tL9LDQJB6ibE9UWx66H5yz_934,489
|
|
4
4
|
cobweb/decorators.py,sha256=eYQI9rddPVJihAlomLTmbtQhIOzPw8dCrOFpxAq2pLY,318
|
|
@@ -8,7 +8,7 @@ cobweb/setting.py,sha256=UAu_dLuIFYO98MxtlZ5sZqJcwKAUKq4Bu4KoKlV50Mc,288
|
|
|
8
8
|
cobweb/task.py,sha256=okE6rBFm9VnYOAXShuTXJ0uvc-_ITsuuxhyxNKbymmU,1775
|
|
9
9
|
cobweb/utils.py,sha256=ivmRqJJNtwdOKYT4G7qQCWnL8ar9c-shxeDZzGB2E9c,2651
|
|
10
10
|
cobweb/db/__init__.py,sha256=jC-uOThYLtiDUG6cTJRkDITgOzR4nIOeaZQeZhuk-v0,139
|
|
11
|
-
cobweb/db/oss_db.py,sha256=
|
|
11
|
+
cobweb/db/oss_db.py,sha256=59HwMMfoGUr6l_BI4p84YHYoQwEn22cCM_1GZK34Uo4,4244
|
|
12
12
|
cobweb/db/redis_db.py,sha256=go9IPQQZAl_jXiHDTruWF7N8svs9QEpQPOr7JhuLCQs,8179
|
|
13
13
|
cobweb/db/scheduler/__init__.py,sha256=w5uIGEB1wLJ-H9RqGpzRwOEWW-BBVSk6Cc7FxZIlWCs,51
|
|
14
14
|
cobweb/db/scheduler/default.py,sha256=XDtxNyu5KTpVAbfCOW8mR1zNFNHiMuaQ4sAhZuIYBoM,79
|
|
@@ -21,19 +21,19 @@ cobweb/db/storer/textfile.py,sha256=auoXGXLbIbEhMoeYIhy58qw22N2r0fQTtzVjHCjqVGA,
|
|
|
21
21
|
cobweb/distributed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
cobweb/distributed/launcher.py,sha256=jTtBXBmna_6yFdj6gyGQiiEtg8I0g5uI5h8kbHWt454,7998
|
|
23
23
|
cobweb/distributed/models.py,sha256=PUQokXMGD-H4A99nX7qYA395Ul6IsWGruMTVa05nswY,4568
|
|
24
|
-
cobweb/equip/__init__.py,sha256=
|
|
24
|
+
cobweb/equip/__init__.py,sha256=LWhbrTnG9kD1et0D40EzLISPuE0PIS-5WD3y3CLDaWk,247
|
|
25
25
|
cobweb/equip/distributed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
cobweb/equip/distributed/launcher.py,sha256=1LzxibGXWR20XpXawakiRpEMaa9yfaj2rFSKnmEwjFc,7475
|
|
27
27
|
cobweb/equip/distributed/models.py,sha256=qTGzxLdb2arsZSZK2HE4-MrqhraUhc2Ol5wBvlv_aWA,5008
|
|
28
28
|
cobweb/equip/single/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
cobweb/equip/single/launcher.py,sha256=
|
|
29
|
+
cobweb/equip/single/launcher.py,sha256=KRsw7yxklvFM85cel-EyLsNPLyrC9Hd26BMSx6-4Hac,6785
|
|
30
30
|
cobweb/equip/single/models.py,sha256=RFhodfO9UDba2C4a3yHVrbzv-CSqfgbR2zAH8U-O7gk,4640
|
|
31
31
|
cobweb/single/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
cobweb/single/launcher.py,sha256=IoJbn87j7t7Pib_FxoWZmmX8asXOqNGb-9ospw6EYJI,7302
|
|
33
33
|
cobweb/single/models.py,sha256=UXcxr_Quok91k82plaqbj4deB-UBCWo14WCo6SS5L_o,4247
|
|
34
34
|
cobweb/single/nest.py,sha256=49K6KQ934INfPrWQsrq9rIFpQauLbLGOFbDaHvoQzOk,5015
|
|
35
|
-
cobweb_launcher-0.1.
|
|
36
|
-
cobweb_launcher-0.1.
|
|
37
|
-
cobweb_launcher-0.1.
|
|
38
|
-
cobweb_launcher-0.1.
|
|
39
|
-
cobweb_launcher-0.1.
|
|
35
|
+
cobweb_launcher-0.1.14.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
36
|
+
cobweb_launcher-0.1.14.dist-info/METADATA,sha256=cHaBgWqZpwy_aGAZF0jBOwYzbDlJUSMmj_mXb0ST7L0,1220
|
|
37
|
+
cobweb_launcher-0.1.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
38
|
+
cobweb_launcher-0.1.14.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
|
39
|
+
cobweb_launcher-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|