Closed mzch closed 2 years ago
Describe the bug In 1.1.0 TypeError occurred.
1.1.0
To Reproduce Steps to reproduce the behavior:
pip install postfix-mta-sts-resolver[redis,sqlite]
mta-sts-daemon --config $HOME/daemon.yml --logfile $HOME/logs/daemon.log
Expected behavior Run successfully.
Output listings
Traceback (most recent call last): File "/srv/mta-sts/.pyenv/versions/3.9.9/bin/mta-sts-daemon", line 8, in <module> sys.exit(main()) File "/srv/mta-sts/.pyenv/versions/3.9.9/lib/python3.9/site-packages/postfix_mta_sts_resolver/daemon.py", line 123, in main evloop.run_until_complete(amain(cfg, evloop)) File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete File "/srv/mta-sts/.pyenv/versions/3.9.9/lib/python3.9/site-packages/postfix_mta_sts_resolver/daemon.py", line 65, in amain await cache.setup() import json import uuid File "/srv/mta-sts/.pyenv/versions/3.9.9/lib/python3.9/site-packages/postfix_mta_sts_resolver/redis_cache.py", line 39, in setup self._pool = await aioredis.from_url(**self._opts) TypeError: from_url() missing 1 required positional argument: 'url'
Environment (please complete the following information):
Additional context
host: 127.0.0.1 port: 8461 reuse_port: true shutdown_timeout: 20 proactive_policy_fetching: enabled: true cache: type: redis options: address: "redis://127.0.0.1:6379/5?timeout=5" minsize: 5 maxsize: 25 default_zone: strict_testing: false timeout: 4 zones: mail-services.net: strict_testing: false timeout: 4
Fixed? I add a line to add url argument, it seems good...?
--- redis_cache.py.orig 2021-12-18 14:22:14.674578264 +0900 +++ redis_cache.py 2021-12-18 14:21:50.126583375 +0900 @@ -35,7 +35,8 @@ self._pool = None async def setup(self):
self._pool = await aioredis.from_url(url, **self._opts)
async def get(self, key): assert self._pool is not None
Is this correct?
Hello!
Seems good to me, especially if it worked for you.
Don't you mind submit pull request with that fix, do you?
Just created. Please see #82 . :)
Thank you! Merged #82. Going to make a new release soon.
Describe the bug In
1.1.0
TypeError occurred.To Reproduce Steps to reproduce the behavior:
pip install postfix-mta-sts-resolver[redis,sqlite]
mta-sts-daemon --config $HOME/daemon.yml --logfile $HOME/logs/daemon.log
Expected behavior Run successfully.
Output listings
Environment (please complete the following information):
Additional context
Fixed? I add a line to add url argument, it seems good...?
self._pool = await aioredis.from_url(url, **self._opts)
async def get(self, key): assert self._pool is not None