zenx 0.5.5__py3-none-any.whl → 0.5.7__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.
- zenx/clients/database.py +1 -1
- zenx/engine.py +5 -2
- zenx/pipelines/google_rpc.py +1 -1
- zenx/pipelines/manager.py +1 -1
- zenx/pipelines/websocket.py +1 -1
- zenx/utils.py +1 -1
- {zenx-0.5.5.dist-info → zenx-0.5.7.dist-info}/METADATA +1 -1
- {zenx-0.5.5.dist-info → zenx-0.5.7.dist-info}/RECORD +11 -11
- {zenx-0.5.5.dist-info → zenx-0.5.7.dist-info}/WHEEL +0 -0
- {zenx-0.5.5.dist-info → zenx-0.5.7.dist-info}/entry_points.txt +0 -0
- {zenx-0.5.5.dist-info → zenx-0.5.7.dist-info}/top_level.txt +0 -0
zenx/clients/database.py
CHANGED
zenx/engine.py
CHANGED
@@ -51,12 +51,15 @@ class Engine:
|
|
51
51
|
try:
|
52
52
|
if self.forever:
|
53
53
|
while not self.shutdown_event.is_set():
|
54
|
-
|
54
|
+
try:
|
55
|
+
await spider.crawl()
|
56
|
+
except Exception:
|
57
|
+
pass
|
55
58
|
else:
|
56
59
|
await spider.crawl()
|
57
60
|
finally:
|
58
61
|
if self.shutdown_event.is_set():
|
59
|
-
logger.
|
62
|
+
logger.info("shutdown", spider=spider_name)
|
60
63
|
await client.close()
|
61
64
|
await db.close()
|
62
65
|
await pm.close_pipelines()
|
zenx/pipelines/google_rpc.py
CHANGED
@@ -61,7 +61,7 @@ try:
|
|
61
61
|
self.logger.debug("connecting", pipeline=self.name)
|
62
62
|
self._channel.get_state(try_to_connect=True)
|
63
63
|
await self._channel.channel_ready()
|
64
|
-
self.logger.
|
64
|
+
self.logger.info("connected", pipeline=self.name)
|
65
65
|
self._connected.set()
|
66
66
|
|
67
67
|
|
zenx/pipelines/manager.py
CHANGED
@@ -27,7 +27,7 @@ class PipelineManager:
|
|
27
27
|
try:
|
28
28
|
item = await pipeline.process_item(item, spider)
|
29
29
|
except DropItem:
|
30
|
-
self.logger.
|
30
|
+
self.logger.debug("dropped", id=item.get("_id"))
|
31
31
|
break
|
32
32
|
except Exception:
|
33
33
|
self.logger.exception("process_item", pipeline=pipeline.name, item=item)
|
zenx/pipelines/websocket.py
CHANGED
@@ -56,7 +56,7 @@ try:
|
|
56
56
|
msg = json.loads(await self._ws_client.recv())['data']['message']
|
57
57
|
if "Invalid secret key" in msg:
|
58
58
|
raise Exception(msg)
|
59
|
-
self.logger.
|
59
|
+
self.logger.info("connected", pipeline=self.name, msg=msg)
|
60
60
|
self._connected.set()
|
61
61
|
|
62
62
|
|
zenx/utils.py
CHANGED
@@ -14,6 +14,6 @@ def log_processing_time(func):
|
|
14
14
|
start_time = get_time()
|
15
15
|
result = await func(self, item, spider, *args, **kwargs)
|
16
16
|
processed_time = get_time() - start_time
|
17
|
-
self.logger.
|
17
|
+
self.logger.info("processed", id=item['_id'], time_ms=processed_time, pipeline=self.name)
|
18
18
|
return result
|
19
19
|
return wrapper
|
@@ -1,27 +1,27 @@
|
|
1
1
|
zenx/cli.py,sha256=pHKhOTdqI6NQQoYK91waRIMpxCXLYtXEryzVaTbmvqc,2810
|
2
2
|
zenx/debug_runner.py,sha256=B2Jd9A4_EHDa-ohLcwnFIxOV73FagTWXX2fl3qgwlpY,809
|
3
3
|
zenx/discovery.py,sha256=YANVGzy2IG1fYruUud-11Y-ynyO6iEp3EjlHnhIQJQI,1014
|
4
|
-
zenx/engine.py,sha256=
|
4
|
+
zenx/engine.py,sha256=bAeyZ1-zV2ejHkyy6rjB8SupJzfwxBgFykNoVvGuFp0,2279
|
5
5
|
zenx/exceptions.py,sha256=BJXxzwwX2CU6inhppfblx8c8Z6Mhvsk7MAhQ1LAnhBg,37
|
6
6
|
zenx/logger.py,sha256=UmEk0vV1mSCozV7z_DDgCCXdAManDr5wgkrhKiRQtyU,1651
|
7
7
|
zenx/settings.py,sha256=Q0z3oGyVkhucRyqsraZQR1lAPSq1sjiGKmAkDCmQsA0,940
|
8
|
-
zenx/utils.py,sha256=
|
8
|
+
zenx/utils.py,sha256=ozf3dpcH1KyDXh9coDe3NqzL8OS-1uA6SaQ8lfHfI40,587
|
9
9
|
zenx/clients/__init__.py,sha256=CaAAuNa8DPyMdejR0KNSDDg_UzC3WxaTol5_QvwwwG8,132
|
10
|
-
zenx/clients/database.py,sha256=
|
10
|
+
zenx/clients/database.py,sha256=GaIafQ2OkYJQ_sz2f6u7sZKn77VOReWun09hogk6dO0,6019
|
11
11
|
zenx/clients/http.py,sha256=0vkbMLILNivZeENpt8cHGZppiInHk4KSSyKZdulB2ZA,5675
|
12
12
|
zenx/pipelines/__init__.py,sha256=IxkZ0UpEJdYjLdd-PMcC9PzzzArTBNNcpgKc7NiOe5Y,131
|
13
13
|
zenx/pipelines/base.py,sha256=N_388z5DFMeaU6wMwcClZAbQFWKh4kpAF7eUJhpQevs,1863
|
14
|
-
zenx/pipelines/google_rpc.py,sha256=
|
15
|
-
zenx/pipelines/manager.py,sha256
|
14
|
+
zenx/pipelines/google_rpc.py,sha256=F7p5ml9W1UliZbrDrF9MFNVKlCP5pG1WpO6rdmBgKp8,4707
|
15
|
+
zenx/pipelines/manager.py,sha256=LRejhnSiXospa4cMSX9Srp0jfscGnHDggXyl1aUNhtg,1300
|
16
16
|
zenx/pipelines/preprocess.py,sha256=k1Ake8H3nm_S_0ZnruyXAl7cFlBhLn-wpQZHuovIH4o,774
|
17
|
-
zenx/pipelines/websocket.py,sha256=
|
17
|
+
zenx/pipelines/websocket.py,sha256=74XIV7_YbBngCgqKP3ZiBpDfQte-VB2G4kjNsZyycIc,4456
|
18
18
|
zenx/resources/proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
zenx/resources/proto/feed_pb2.py,sha256=ZyICOLnyuXekkvV4bAHZ1nE1-wwzcYYRRrmRJCMrSoo,2810
|
20
20
|
zenx/resources/proto/feed_pb2_grpc.py,sha256=Mim6FfBgIMj0PmTqHk036nVUMJH3A6I3ts6r1j3bQF8,7441
|
21
21
|
zenx/spiders/__init__.py,sha256=rs5LuqdM2MQlUYiTGJrzkYhzN8_SSLTrR7wGjSRrrSo,25
|
22
22
|
zenx/spiders/base.py,sha256=KoMsT7ezwne1clTtP66dfvQGZPzdg2e7ygkM40h2QbA,1659
|
23
|
-
zenx-0.5.
|
24
|
-
zenx-0.5.
|
25
|
-
zenx-0.5.
|
26
|
-
zenx-0.5.
|
27
|
-
zenx-0.5.
|
23
|
+
zenx-0.5.7.dist-info/METADATA,sha256=SXR4szg0b5CfbHUvyuIq-TV8xIx7MTpElYLVUqLANy4,1273
|
24
|
+
zenx-0.5.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
25
|
+
zenx-0.5.7.dist-info/entry_points.txt,sha256=8JXob2f1VtvzGFris-e9Usqywg7oca-cChDlH9moOZU,38
|
26
|
+
zenx-0.5.7.dist-info/top_level.txt,sha256=JeXwvK86d7sB-2x-avugFnZIZa33zaHWKI8RHWJR6KY,5
|
27
|
+
zenx-0.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|