docs: README pin to v1.1.0; wrapped methods log at DEBUG and re-raise
Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
1 parent
69e0184cef
commit
c499af1316
1 file changed
+6
-5
@@ -14,19 +14,19 @@ datastore trio (`redis` / `psql` / `mysql`), a sibling of the `mongo` lib.
|
||||
`requirements.txt`:
|
||||
|
||||
```
|
||||
redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v1.0.0
|
||||
redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v1.1.0
|
||||
```
|
||||
|
||||
Direct:
|
||||
|
||||
```bash
|
||||
pip install "redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v1.0.0"
|
||||
pip install "redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v1.1.0"
|
||||
```
|
||||
|
||||
Pulls `redis>=5.0.1` (redis-py, which ships the asyncio client — **not** the dead standalone
|
||||
`aioredis`; `5.0.1` is the floor because `5.0.0` lacks the async client's `aclose()`).
|
||||
|
||||
Drop the `@v1.0.0` suffix from the line above to install the latest unpinned.
|
||||
Drop the `@v1.1.0` suffix from the line above to install the latest unpinned.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -77,8 +77,9 @@ it (`ssl_ca_certs`, `ssl_certfile`, ...) to configure the handshake.
|
||||
## Error contract — fail loud
|
||||
|
||||
Unlike the `mongo` lib (which log-and-swallows, returning a safe default), **this lib
|
||||
re-raises.** Every wrapped method catches the driver's `RedisError`, logs it via
|
||||
`logging.getLogger(__name__)`, and raises. A `None` / `[]` / `{}` return is only ever a
|
||||
re-raises.** Every wrapped method catches the driver's `RedisError`, logs it at DEBUG (with
|
||||
the traceback) via `logging.getLogger(__name__)`, and re-raises: the raised exception is the
|
||||
signal, and the caller decides whether it is fatal and logs it. A `None` / `[]` / `{}` return is only ever a
|
||||
real result (absent key, empty hash) — never a swallowed failure. So a caller can trust
|
||||
that no exception means the op succeeded.
|
||||
|
||||
|
||||
Reference in new issue
Block a user