zenx 0.7.3__tar.gz → 0.7.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.7.3 → zenx-0.7.7}/PKG-INFO +1 -1
  2. {zenx-0.7.3 → zenx-0.7.7}/pyproject.toml +1 -1
  3. {zenx-0.7.3 → zenx-0.7.7}/zenx/clients/database.py +2 -2
  4. {zenx-0.7.3 → zenx-0.7.7}/zenx/pipelines/google_rpc.py +1 -2
  5. {zenx-0.7.3 → zenx-0.7.7}/zenx/pipelines/websocket.py +1 -2
  6. {zenx-0.7.3 → zenx-0.7.7}/zenx.egg-info/PKG-INFO +1 -1
  7. {zenx-0.7.3 → zenx-0.7.7}/setup.cfg +0 -0
  8. {zenx-0.7.3 → zenx-0.7.7}/zenx/cli.py +0 -0
  9. {zenx-0.7.3 → zenx-0.7.7}/zenx/clients/__init__.py +0 -0
  10. {zenx-0.7.3 → zenx-0.7.7}/zenx/clients/http.py +0 -0
  11. {zenx-0.7.3 → zenx-0.7.7}/zenx/debug_runner.py +0 -0
  12. {zenx-0.7.3 → zenx-0.7.7}/zenx/discovery.py +0 -0
  13. {zenx-0.7.3 → zenx-0.7.7}/zenx/engine.py +0 -0
  14. {zenx-0.7.3 → zenx-0.7.7}/zenx/exceptions.py +0 -0
  15. {zenx-0.7.3 → zenx-0.7.7}/zenx/logger.py +0 -0
  16. {zenx-0.7.3 → zenx-0.7.7}/zenx/pipelines/__init__.py +0 -0
  17. {zenx-0.7.3 → zenx-0.7.7}/zenx/pipelines/base.py +0 -0
  18. {zenx-0.7.3 → zenx-0.7.7}/zenx/pipelines/manager.py +0 -0
  19. {zenx-0.7.3 → zenx-0.7.7}/zenx/pipelines/preprocess.py +0 -0
  20. {zenx-0.7.3 → zenx-0.7.7}/zenx/resources/proto/__init__.py +0 -0
  21. {zenx-0.7.3 → zenx-0.7.7}/zenx/resources/proto/feed_pb2.py +0 -0
  22. {zenx-0.7.3 → zenx-0.7.7}/zenx/resources/proto/feed_pb2_grpc.py +0 -0
  23. {zenx-0.7.3 → zenx-0.7.7}/zenx/settings.py +0 -0
  24. {zenx-0.7.3 → zenx-0.7.7}/zenx/spiders/__init__.py +0 -0
  25. {zenx-0.7.3 → zenx-0.7.7}/zenx/spiders/base.py +0 -0
  26. {zenx-0.7.3 → zenx-0.7.7}/zenx/utils.py +0 -0
  27. {zenx-0.7.3 → zenx-0.7.7}/zenx.egg-info/SOURCES.txt +0 -0
  28. {zenx-0.7.3 → zenx-0.7.7}/zenx.egg-info/dependency_links.txt +0 -0
  29. {zenx-0.7.3 → zenx-0.7.7}/zenx.egg-info/entry_points.txt +0 -0
  30. {zenx-0.7.3 → zenx-0.7.7}/zenx.egg-info/requires.txt +0 -0
  31. {zenx-0.7.3 → zenx-0.7.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.7.3
3
+ Version: 0.7.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.7.3"
3
+ version = "0.7.7"
4
4
  description = "mini-framework"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
@@ -1,6 +1,5 @@
1
1
  from __future__ import annotations
2
2
  from abc import ABC, abstractmethod
3
- import time
4
3
  import collections
5
4
  from typing import ClassVar, Dict, List, Optional, Type
6
5
  from structlog import BoundLogger
@@ -113,7 +112,7 @@ try:
113
112
 
114
113
  async def _connect(self) -> None:
115
114
  self.logger.debug("connecting", db=self.name)
116
- self.r = redis.Redis(
115
+ pool = redis.ConnectionPool(
117
116
  host=self.settings.DB_HOST,
118
117
  port=self.settings.DB_PORT,
119
118
  password=self.settings.DB_PASS,
@@ -121,6 +120,7 @@ try:
121
120
  socket_connect_timeout=5,
122
121
  decode_responses=True,
123
122
  )
123
+ self.r = redis.Redis(connection_pool=pool)
124
124
  await self.r.ping()
125
125
  self.logger.info("connected", db=self.name)
126
126
 
@@ -51,8 +51,7 @@ try:
51
51
  await self._channel.wait_for_state_change(ready_state)
52
52
  try:
53
53
  await self._connect()
54
- except Exception as e:
55
- self.logger.error("reconnecting", exception=str(e), pipeline=self.name)
54
+ except Exception:
56
55
  await asyncio.sleep(0.5)
57
56
 
58
57
 
@@ -44,8 +44,7 @@ try:
44
44
  await self._ws_client.wait_closed()
45
45
  try:
46
46
  await self._connect()
47
- except Exception as e:
48
- self.logger.error("reconnecting", exception=str(e), pipeline=self.name)
47
+ except Exception:
49
48
  await asyncio.sleep(0.5)
50
49
 
51
50
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zenx
3
- Version: 0.7.3
3
+ Version: 0.7.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
File without changes
File without changes
File without changes