Improve Redis connection handling — flexible auth + proper host override + modern close#283
Improve Redis connection handling — flexible auth + proper host override + modern close#283simonvanlierde wants to merge 9 commits into
Conversation
|
Hi @simonvanlierde, thanks for your PR, why removing localhost connection, if user needs to fallback to the localhost. |
…ariable * upstream/master: (23 commits) chore: update poetry.lock fix: make redis an optional dependency fix linter refactor: use single underscore for overridable internal methods Updated libraries chore: upgrade deps feat: use project section style(msg): split long comment to satisfy flake8 E501 (max 115 chars) fix(msg): derive MIME type from UploadFile content-type header (sabuhish#217) fix(config): enable Jinja2 autoescape to prevent XSS vulnerabilities (sabuhish#295) fix(msg): reset file pointer before reading attachment payload (sabuhish#228) Update pyproject.toml issue-286: allow passing Message-ID Header Updated libs sabuhish#276 sabuhish#277 sabuhish#278 sabuhish#281 sabuhish#287 Refactor bulk email functionality to use `send_message()` for sending multiple messages in one call. Updated documentation and examples accordingly, and modified tests to reflect the new method. Enhanced error handling for empty message lists and invalid message types. Update bulk email example to use NameEmail format for recipients and improve formatting in name email example Refactor import statement in bulk email example Refactor import order and enhance test payload decoding Add bulk email sending functionality and error handling fix: linting and ensuring redis_client is not None ... # Conflicts: # fastapi_mail/email_utils/email_check.py
|
Adjusted. The default now still falls back to localhost via redis_host="localhost", while users can override it with redis_host when Redis is not running locally. I also added tests for the localhost fallback, custom host override, and existing redis_client reuse. |
|
Thanks again for your changes, I am wondering why each time _get_redis_client() being called? Instead it could be taken from object itself. |
|
Good point, thanks! I've refactored so the client is taken from the object directly. |
Some small quality of life improvements in the redis connections for the email_checker: