Closed FridayPush closed 4 weeks ago
Related to Documentation but the contribution guide file might need to list what local services like Redis, Postgres(?) need to be running for tests to succeed, along with any credential/config setup? Went to make a PR for the other issue I opened and local tests fail with:
Went to work on a Pull Request but found that a local redis environment is required:
FAILED tests/test_bucket_all.py::test_bucket_01[clock0-create_async_redis_bucket] - redis.exceptions.ConnectionError: Error connecting to localhost:6379. Multiple exceptions: [Errno 61] Connect call failed ('127.0.0.1', 6379), [Errno 61] Connect call failed ('::1', 6379, 0, 0).
Ah there is a docker compose in the repo you can use for testing i believe?
And regarding the async support, its not just redis that can work with async. When you use a clock backend that sync clock remotely in async manner, the limiter still works too.
Updated!
Exploring PyrateLimiter and I'm stumbling a bit on the documentation to understand when Async is supported. It's probably my ignorance of the project but it appears that in order to use Async with PyrateLimiter I must be using Redis as the backend?
If it's accurate to say a Redis backend is needed for Async functionality I think it would be worth modifying the 'Key Concepts' section to reference the need for a Redis Backend:
Additionally the documentation for backends lists InMemory doesn't support async, Redis does, and SQLite and Postgres do not mention whether they support async or not.