diff options
author | 2020-09-19 21:45:54 +0200 | |
---|---|---|
committer | 2020-09-19 22:14:37 +0200 | |
commit | fc058490d62fa373e6ebb01392c511027401e72f (patch) | |
tree | 1125c6429de34a09082d88703ba12f2d68b120cc /tests/test_helpers.py | |
parent | Merge pull request #1158 from python-discord/config-update (diff) |
Use async-rediscache package for our redis caches
I've migrated our redis caches over to the async-rediscache package that
we've recently released (https://git.pydis.com/async-rediscache). The
main functionality remains the same, although the package handles some
things, like getting the active session, differently internally.
The main changes you'll note for our bot are:
- We create a RedisSession instance and ensure that it connects before
we even create a Bot instance in `__main__.py`.
- We are now actually using a connection pool instead of a single
connection.
- Our Bot subclass now has a new required kwarg: `redis_session`.
- Bool values are now properly converted to and from typestrings.
In addition, I've made sure that our MockBot passes a MagicMock for the
new `redis_session` kwarg when creating a Bot instance for the spec_set.
Signed-off-by: Sebastiaan Zeeff <[email protected]>
Diffstat (limited to 'tests/test_helpers.py')
0 files changed, 0 insertions, 0 deletions