zenx 0.10.0__py3-none-any.whl → 0.10.1__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/engine.py +4 -3
- {zenx-0.10.0.dist-info → zenx-0.10.1.dist-info}/METADATA +1 -1
- {zenx-0.10.0.dist-info → zenx-0.10.1.dist-info}/RECORD +6 -6
- {zenx-0.10.0.dist-info → zenx-0.10.1.dist-info}/WHEEL +0 -0
- {zenx-0.10.0.dist-info → zenx-0.10.1.dist-info}/entry_points.txt +0 -0
- {zenx-0.10.0.dist-info → zenx-0.10.1.dist-info}/top_level.txt +0 -0
zenx/engine.py
CHANGED
@@ -26,7 +26,7 @@ class Engine:
|
|
26
26
|
self.shutdown_event.set()
|
27
27
|
|
28
28
|
|
29
|
-
async def
|
29
|
+
async def _execute_spider(self, spider_name: str) -> None:
|
30
30
|
loop = asyncio.get_running_loop()
|
31
31
|
loop.add_signal_handler(signal.SIGINT, self._shutdown_handler)
|
32
32
|
loop.add_signal_handler(signal.SIGTERM, self._shutdown_handler)
|
@@ -50,8 +50,9 @@ class Engine:
|
|
50
50
|
try:
|
51
51
|
if self.forever:
|
52
52
|
while not self.shutdown_event.is_set():
|
53
|
+
crawl_task = asyncio.create_task(spider.crawl())
|
53
54
|
try:
|
54
|
-
await
|
55
|
+
await crawl_task
|
55
56
|
except Exception:
|
56
57
|
logger.exception("crawl")
|
57
58
|
await asyncio.sleep(0.01)
|
@@ -69,7 +70,7 @@ class Engine:
|
|
69
70
|
|
70
71
|
|
71
72
|
def run_spider(self, spider: str) -> None:
|
72
|
-
uvloop.run(self.
|
73
|
+
uvloop.run(self._execute_spider(spider))
|
73
74
|
|
74
75
|
|
75
76
|
def run_spiders(self, spiders: List[str]) -> None:
|
@@ -1,7 +1,7 @@
|
|
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=gH47sVH4-Xdrj_uCcuiHoNsMGCryU4GW0eScihdtTC0,2630
|
5
5
|
zenx/exceptions.py,sha256=BJXxzwwX2CU6inhppfblx8c8Z6Mhvsk7MAhQ1LAnhBg,37
|
6
6
|
zenx/logger.py,sha256=lr45XGbV769NQcwn8-lAcPfFbR4yBN8LNh7o-i4Aa9M,1652
|
7
7
|
zenx/settings.py,sha256=anTT_jSQxwIabBHCM7egYFUOnALxp4fF_26_2ZPtTt4,1044
|
@@ -21,8 +21,8 @@ zenx/resources/proto/feed_pb2.py,sha256=ZyICOLnyuXekkvV4bAHZ1nE1-wwzcYYRRrmRJCMr
|
|
21
21
|
zenx/resources/proto/feed_pb2_grpc.py,sha256=Mim6FfBgIMj0PmTqHk036nVUMJH3A6I3ts6r1j3bQF8,7441
|
22
22
|
zenx/spiders/__init__.py,sha256=rs5LuqdM2MQlUYiTGJrzkYhzN8_SSLTrR7wGjSRrrSo,25
|
23
23
|
zenx/spiders/base.py,sha256=MeZ3wZOPOyOX4V2ufFXtYGCDtXHZO_mNfnXdKMkisuQ,1951
|
24
|
-
zenx-0.10.
|
25
|
-
zenx-0.10.
|
26
|
-
zenx-0.10.
|
27
|
-
zenx-0.10.
|
28
|
-
zenx-0.10.
|
24
|
+
zenx-0.10.1.dist-info/METADATA,sha256=aJMrUv8JOnXBB5ZtzTVfVfRM8mUvUMeeDSQiT33Cjhc,1422
|
25
|
+
zenx-0.10.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
26
|
+
zenx-0.10.1.dist-info/entry_points.txt,sha256=8JXob2f1VtvzGFris-e9Usqywg7oca-cChDlH9moOZU,38
|
27
|
+
zenx-0.10.1.dist-info/top_level.txt,sha256=JeXwvK86d7sB-2x-avugFnZIZa33zaHWKI8RHWJR6KY,5
|
28
|
+
zenx-0.10.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|