summaryrefslogtreecommitdiff
path: root/searx/shared/redisdb.py
AgeCommit message (Collapse)Author
2022-12-10move searx.shared.redisdb to searx.redisdbAlexandre Flament
2022-11-29Copy client connection kwargs before mutatingRyan Kaskel
2022-11-07[FIX] Redis initializationAlexandre FLAMENT
redis.Redis.from_url(url) doesn't check if the url is valid Before this commit: actual error are detected later when the client is actually used. With this commit, client() makes sure to return a valid Redis client or None. Also, the code makes sure not to log the password of the Redis URL
2022-11-05Initialize Redis in searx/webapp.pyAlexandre FLAMENT
settings.yml: * The default URL was unix:///usr/local/searxng-redis/run/redis.sock?db=0 * The default URL is now "false" The default URL makes the log difficult to deal with: if the admin didn't install a Redis instance, the logs record a false error. It worked before because SearXNG initialized the Redis connection when the limiter started. In this commit, SearXNG initializes Redis in searx/webapp.py so various components can use Redis without taking care of the initialization step.
2022-11-05The checker requires RedisAlexandre Flament
Remove the abstraction in searx.shared.SharedDict. Implement a basic and dedicated scheduler for the checker using a Redis script.
2022-07-30[utils/searxng.sh] implement new script to install SearXNGMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-17Revert "[hotfix] interim fix to get docker-build of CI without issues"Markus Heiser
This reverts interim fix from commit 50c4b58db and adds requirement `redis==4.1.1`. The interim fix was needed by Alpine images (Docker) [1] and has been fixed in commit [2] merged with the patch series from [3]. In redis-py version 4.1.1 this pach has been released on PyPi [4]. [1] https://github.com/redis/redis-py/issues/1869 [2] https://github.com/redis/redis-py/commit/1fc1233f [3] https://github.com/redis/redis-py/pull/1854 [4] https://github.com/redis/redis-py/issues/1880 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12[hotfix] interim fix to get docker-build of CI without issuesMarkus Heiser
There is an issue with redis v4.1.0 [1] / for the interim lets remove this python dependency. [1] https://github.com/searxng/searxng/issues/741 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07[fix] redis: don't create a new connection at each client() callMarkus Heiser
Suggested-by: @dalf https://github.com/searxng/searxng/pull/686#pullrequestreview-844942973 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-03[enh] add redis connector searx/shared/redisdb.pyMarkus Heiser
Add a redis connector, the default DB connector is a socket at:: unix:///usr/local/searxng-redis/run/redis.sock?db=0 To set up a redis instance simply use:: $ ./manage redis.build $ sudo -H ./manage redis.install A hint for developers: To get access rights to this instance, your developer account needs to be added to the *searxng-redis* group:: $ sudo -H ./manage redis.addgrp "${USER}" # don't forget to logout & login to get member of group Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>