zenx 0.5.5__tar.gz → 0.5.7__tar.gz

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.
Files changed (31) hide show
  1. {zenx-0.5.5 → zenx-0.5.7}/PKG-INFO +1 -1
  2. {zenx-0.5.5 → zenx-0.5.7}/pyproject.toml +1 -1
  3. {zenx-0.5.5 → zenx-0.5.7}/zenx/clients/database.py +1 -1
  4. {zenx-0.5.5 → zenx-0.5.7}/zenx/engine.py +5 -2
  5. {zenx-0.5.5 → zenx-0.5.7}/zenx/pipelines/google_rpc.py +1 -1
  6. {zenx-0.5.5 → zenx-0.5.7}/zenx/pipelines/manager.py +1 -1
  7. {zenx-0.5.5 → zenx-0.5.7}/zenx/pipelines/websocket.py +1 -1
  8. {zenx-0.5.5 → zenx-0.5.7}/zenx/utils.py +1 -1
  9. {zenx-0.5.5 → zenx-0.5.7}/zenx.egg-info/PKG-INFO +1 -1
  10. {zenx-0.5.5 → zenx-0.5.7}/setup.cfg +0 -0
  11. {zenx-0.5.5 → zenx-0.5.7}/zenx/cli.py +0 -0
  12. {zenx-0.5.5 → zenx-0.5.7}/zenx/clients/__init__.py +0 -0
  13. {zenx-0.5.5 → zenx-0.5.7}/zenx/clients/http.py +0 -0
  14. {zenx-0.5.5 → zenx-0.5.7}/zenx/debug_runner.py +0 -0
  15. {zenx-0.5.5 → zenx-0.5.7}/zenx/discovery.py +0 -0
  16. {zenx-0.5.5 → zenx-0.5.7}/zenx/exceptions.py +0 -0
  17. {zenx-0.5.5 → zenx-0.5.7}/zenx/logger.py +0 -0
  18. {zenx-0.5.5 → zenx-0.5.7}/zenx/pipelines/__init__.py +0 -0
  19. {zenx-0.5.5 → zenx-0.5.7}/zenx/pipelines/base.py +0 -0
  20. {zenx-0.5.5 → zenx-0.5.7}/zenx/pipelines/preprocess.py +0 -0
  21. {zenx-0.5.5 → zenx-0.5.7}/zenx/resources/proto/__init__.py +0 -0
  22. {zenx-0.5.5 → zenx-0.5.7}/zenx/resources/proto/feed_pb2.py +0 -0
  23. {zenx-0.5.5 → zenx-0.5.7}/zenx/resources/proto/feed_pb2_grpc.py +0 -0
  24. {zenx-0.5.5 → zenx-0.5.7}/zenx/settings.py +0 -0
  25. {zenx-0.5.5 → zenx-0.5.7}/zenx/spiders/__init__.py +0 -0
  26. {zenx-0.5.5 → zenx-0.5.7}/zenx/spiders/base.py +0 -0
  27. {zenx-0.5.5 → zenx-0.5.7}/zenx.egg-info/SOURCES.txt +0 -0
  28. {zenx-0.5.5 → zenx-0.5.7}/zenx.egg-info/dependency_links.txt +0 -0
  29. {zenx-0.5.5 → zenx-0.5.7}/zenx.egg-info/entry_points.txt +0 -0
  30. {zenx-0.5.5 → zenx-0.5.7}/zenx.egg-info/requires.txt +0 -0
  31. {zenx-0.5.5 → zenx-0.5.7}/zenx.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zenx
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: mini-framework
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: curl-cffi>=0.12.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "zenx"
3
- version = "0.5.5"
3
+ version = "0.5.7"
4
4
  description = "mini-framework"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
@@ -148,7 +148,7 @@ try:
148
148
  decode_responses=True,
149
149
  )
150
150
  await self.r.ping()
151
- self.logger.debug("connected", db=self.name)
151
+ self.logger.info("connected", db=self.name)
152
152
 
153
153
 
154
154
  async def insert(self, id: str, spider_name: str) -> None:
@@ -51,12 +51,15 @@ class Engine:
51
51
  try:
52
52
  if self.forever:
53
53
  while not self.shutdown_event.is_set():
54
- await spider.crawl()
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.debug("shutdown", spider=spider_name)
62
+ logger.info("shutdown", spider=spider_name)
60
63
  await client.close()
61
64
  await db.close()
62
65
  await pm.close_pipelines()
@@ -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.debug("connected", pipeline=self.name)
64
+ self.logger.info("connected", pipeline=self.name)
65
65
  self._connected.set()
66
66
 
67
67
 
@@ -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.warning("dropped", id=item.get("_id"))
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)
@@ -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.debug("connected", pipeline=self.name, msg=msg)
59
+ self.logger.info("connected", pipeline=self.name, msg=msg)
60
60
  self._connected.set()
61
61
 
62
62
 
@@ -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.debug("processed", id=item['_id'], time_ms=processed_time, pipeline=self.name)
17
+ self.logger.info("processed", id=item['_id'], time_ms=processed_time, pipeline=self.name)
18
18
  return result
19
19
  return wrapper
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zenx
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: mini-framework
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: curl-cffi>=0.12.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes