cobweb-launcher 3.1.3__py3-none-any.whl → 3.1.5__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.
- cobweb/launchers/uploader.py +5 -5
- {cobweb_launcher-3.1.3.dist-info → cobweb_launcher-3.1.5.dist-info}/METADATA +1 -1
- {cobweb_launcher-3.1.3.dist-info → cobweb_launcher-3.1.5.dist-info}/RECORD +6 -6
- {cobweb_launcher-3.1.3.dist-info → cobweb_launcher-3.1.5.dist-info}/LICENSE +0 -0
- {cobweb_launcher-3.1.3.dist-info → cobweb_launcher-3.1.5.dist-info}/WHEEL +0 -0
- {cobweb_launcher-3.1.3.dist-info → cobweb_launcher-3.1.5.dist-info}/top_level.txt +0 -0
cobweb/launchers/uploader.py
CHANGED
@@ -27,12 +27,12 @@ class Uploader(threading.Thread):
|
|
27
27
|
self.upload_size = setting.UPLOAD_QUEUE_MAX_SIZE
|
28
28
|
self.wait_seconds = setting.UPLOAD_QUEUE_WAIT_SECONDS
|
29
29
|
|
30
|
-
self.
|
30
|
+
self.pipeline = SpiderPipeline()
|
31
31
|
|
32
32
|
logger.debug(f"Uploader instance attrs: {self.__dict__}")
|
33
33
|
|
34
34
|
@check_pause
|
35
|
-
def
|
35
|
+
def upload_data(self):
|
36
36
|
if not self.upload.length:
|
37
37
|
time.sleep(self.wait_seconds)
|
38
38
|
return
|
@@ -45,11 +45,11 @@ class Uploader(threading.Thread):
|
|
45
45
|
if not item:
|
46
46
|
break
|
47
47
|
seeds.append(item.seed)
|
48
|
-
data = self.
|
48
|
+
data = self.pipeline.build(item)
|
49
49
|
data_info.setdefault(item.table, []).append(data)
|
50
50
|
for table, datas in data_info.items():
|
51
51
|
try:
|
52
|
-
self.
|
52
|
+
self.pipeline.upload(table, datas)
|
53
53
|
except Exception as e:
|
54
54
|
logger.info(e)
|
55
55
|
except Exception as e:
|
@@ -60,6 +60,6 @@ class Uploader(threading.Thread):
|
|
60
60
|
logger.info("upload pipeline close!")
|
61
61
|
|
62
62
|
def run(self):
|
63
|
-
self.register(self.
|
63
|
+
self.register(self.upload_data, tag="Uploader")
|
64
64
|
|
65
65
|
|
@@ -18,7 +18,7 @@ cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BX
|
|
18
18
|
cobweb/launchers/__init__.py,sha256=XEW4hmBMPKp2bRkHBxxlplXwvKdlLVYBFg3etjtbRXo,222
|
19
19
|
cobweb/launchers/distributor.py,sha256=WWLyDaSGMWQWKfZX9guUzIZEwAX9FM5pqOUP3WDfEak,6447
|
20
20
|
cobweb/launchers/launcher.py,sha256=rDT7OQX3wzaS_MsbrkeWDH5IHpN5GE_Oy4tUkvnovKM,5302
|
21
|
-
cobweb/launchers/uploader.py,sha256=
|
21
|
+
cobweb/launchers/uploader.py,sha256=gJiKMVeoxxwrLsYPaMuXJN7wc5LFxXfjC4VVIlqqlqk,1818
|
22
22
|
cobweb/pipelines/__init__.py,sha256=zSUsGtx6smbs2iXBXvYynReKSgky-3gjqaAtKVnA_OU,105
|
23
23
|
cobweb/pipelines/pipeline.py,sha256=qwoOYMhlAB-MnEmMNpNeauTHoRTOr2wyBDYS4MF6B1c,261
|
24
24
|
cobweb/pipelines/pipeline_console.py,sha256=NEh-4zhuVAQOqwXLsqeb-rcNZ9_KXFUpL3otUTL5qBs,754
|
@@ -34,8 +34,8 @@ cobweb/utils/decorators.py,sha256=066JCY_RNMr2mXkhEv8XTtOOKkv9CFiBm0ZNCcC-2ag,11
|
|
34
34
|
cobweb/utils/dotting.py,sha256=mVICaa26R-dQ4JGmPK-kkR6QjX38QiRewXZnGb2DCIc,1784
|
35
35
|
cobweb/utils/oss.py,sha256=ktfwMGnq5FMzOkUUS3nNXI7pTdPNinudH3YRJ0nMhoU,3985
|
36
36
|
cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
|
37
|
-
cobweb_launcher-3.1.
|
38
|
-
cobweb_launcher-3.1.
|
39
|
-
cobweb_launcher-3.1.
|
40
|
-
cobweb_launcher-3.1.
|
41
|
-
cobweb_launcher-3.1.
|
37
|
+
cobweb_launcher-3.1.5.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
38
|
+
cobweb_launcher-3.1.5.dist-info/METADATA,sha256=qLeaG7MEqh9mQa-XozLLvrdiaKzKyM3XyCnsfQx8fcM,6509
|
39
|
+
cobweb_launcher-3.1.5.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
40
|
+
cobweb_launcher-3.1.5.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
41
|
+
cobweb_launcher-3.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|