cobweb-launcher 1.2.9__py3-none-any.whl → 1.2.11__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/launchers/launcher_pro.py +6 -3
- cobweb/pipelines/pipeline.py +27 -18
- {cobweb_launcher-1.2.9.dist-info → cobweb_launcher-1.2.11.dist-info}/METADATA +1 -1
- {cobweb_launcher-1.2.9.dist-info → cobweb_launcher-1.2.11.dist-info}/RECORD +7 -7
- {cobweb_launcher-1.2.9.dist-info → cobweb_launcher-1.2.11.dist-info}/LICENSE +0 -0
- {cobweb_launcher-1.2.9.dist-info → cobweb_launcher-1.2.11.dist-info}/WHEEL +0 -0
- {cobweb_launcher-1.2.9.dist-info → cobweb_launcher-1.2.11.dist-info}/top_level.txt +0 -0
cobweb/launchers/launcher_pro.py
CHANGED
|
@@ -125,15 +125,18 @@ class LauncherPro(Launcher):
|
|
|
125
125
|
seeds.append(seed.to_string)
|
|
126
126
|
if seeds:
|
|
127
127
|
count = self._db.zrem(self._todo_key, *seeds)
|
|
128
|
-
|
|
128
|
+
if count:
|
|
129
|
+
self.statistics(self._statistics_done_key, count)
|
|
129
130
|
self._remove_doing_seeds(seeds)
|
|
130
131
|
if s_seeds:
|
|
131
132
|
count = self._db.done([self._todo_key, self._done_key], *s_seeds)
|
|
132
|
-
|
|
133
|
+
if count:
|
|
134
|
+
self.statistics(self._statistics_done_key, count)
|
|
133
135
|
self._remove_doing_seeds(s_seeds)
|
|
134
136
|
if f_seeds:
|
|
135
137
|
count = self._db.done([self._todo_key, self._fail_key], *f_seeds)
|
|
136
|
-
|
|
138
|
+
if count:
|
|
139
|
+
self.statistics(self._statistics_fail_key, count)
|
|
137
140
|
self._remove_doing_seeds(f_seeds)
|
|
138
141
|
|
|
139
142
|
if status:
|
cobweb/pipelines/pipeline.py
CHANGED
|
@@ -34,26 +34,35 @@ class Pipeline(threading.Thread, ABC):
|
|
|
34
34
|
|
|
35
35
|
def run(self):
|
|
36
36
|
while not self._stop.is_set():
|
|
37
|
-
|
|
38
|
-
if status:
|
|
37
|
+
if not self._upload.length:
|
|
39
38
|
time.sleep(self.wait_seconds)
|
|
39
|
+
continue
|
|
40
|
+
if self._upload.length < self.upload_size:
|
|
41
|
+
time.sleep(self.wait_seconds)
|
|
42
|
+
status = True
|
|
40
43
|
data_info, seeds = {}, []
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
try:
|
|
45
|
+
for _ in range(self.upload_size):
|
|
46
|
+
item = self._upload.pop()
|
|
47
|
+
if not item:
|
|
48
|
+
break
|
|
49
|
+
seeds.append(item.seed)
|
|
50
|
+
data = self.build(item)
|
|
51
|
+
data_info.setdefault(item.table, []).append(data)
|
|
52
|
+
for table, datas in data_info.items():
|
|
53
|
+
try:
|
|
54
|
+
self.upload(table, datas)
|
|
55
|
+
except Exception as e:
|
|
56
|
+
logger.info(e)
|
|
57
|
+
status = False
|
|
58
|
+
except Exception as e:
|
|
59
|
+
logger.info(e)
|
|
60
|
+
status = False
|
|
61
|
+
if not status:
|
|
62
|
+
for seed in seeds:
|
|
63
|
+
seed.params.seed_status = "deal model: fail"
|
|
64
|
+
if seeds:
|
|
65
|
+
self._done.push(seeds)
|
|
57
66
|
|
|
58
67
|
logger.info("upload pipeline close!")
|
|
59
68
|
|
|
@@ -20,18 +20,18 @@ cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BX
|
|
|
20
20
|
cobweb/launchers/__init__.py,sha256=af0Y6wrGX8SQZ7w7XL2sOtREjCT3dwad-uCc3nIontY,76
|
|
21
21
|
cobweb/launchers/launcher.py,sha256=mBpq0CmxXXv-KdXQ2x7vwOkkAvaKECLkZLGhraafkQA,5953
|
|
22
22
|
cobweb/launchers/launcher_air.py,sha256=KAk_M8F3029cXYe7m4nn3Nzyi89lbxJ2cqZjqW8iZ0E,2832
|
|
23
|
-
cobweb/launchers/launcher_pro.py,sha256=
|
|
23
|
+
cobweb/launchers/launcher_pro.py,sha256=OmlC5o3BdcsTFwOVAKNJdnwdlTl-fUiXC2kViWEpcoU,7677
|
|
24
24
|
cobweb/pipelines/__init__.py,sha256=zSUsGtx6smbs2iXBXvYynReKSgky-3gjqaAtKVnA_OU,105
|
|
25
25
|
cobweb/pipelines/base_pipeline.py,sha256=fYnWf79GmhufXpcnMa3te18SbmnVeYLwxfyo-zLd9CY,1577
|
|
26
26
|
cobweb/pipelines/loghub_pipeline.py,sha256=cjPO6w6UJ0jNw2fVvdX0BCdlm58T7dmYXlxzXOBpvfY,1027
|
|
27
|
-
cobweb/pipelines/pipeline.py,sha256=
|
|
27
|
+
cobweb/pipelines/pipeline.py,sha256=4TJLX0sUHRxYndF5A4Vs5btUGI-wigkOcFvhTW1hLXI,2009
|
|
28
28
|
cobweb/pipelines/pipeline_console.py,sha256=NEh-4zhuVAQOqwXLsqeb-rcNZ9_KXFUpL3otUTL5qBs,754
|
|
29
29
|
cobweb/pipelines/pipeline_loghub.py,sha256=xZ6D55BGdiM71WUv83jyLGbEyUwhBHLJRZoXthBxxTs,1019
|
|
30
30
|
cobweb/utils/__init__.py,sha256=JTE4sBfHnKHhD6w9Auk0MIT7O9BMOamCeryhlHNx3Zg,47
|
|
31
31
|
cobweb/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
|
|
32
32
|
cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
|
|
33
|
-
cobweb_launcher-1.2.
|
|
34
|
-
cobweb_launcher-1.2.
|
|
35
|
-
cobweb_launcher-1.2.
|
|
36
|
-
cobweb_launcher-1.2.
|
|
37
|
-
cobweb_launcher-1.2.
|
|
33
|
+
cobweb_launcher-1.2.11.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
34
|
+
cobweb_launcher-1.2.11.dist-info/METADATA,sha256=GSDZ3aWvattuW3Md-faK0cSBPyGDA8bJcVZRlSVp4ag,6490
|
|
35
|
+
cobweb_launcher-1.2.11.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
36
|
+
cobweb_launcher-1.2.11.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
|
37
|
+
cobweb_launcher-1.2.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|