From fe419e355bf1527c51e3aee98495d08b89510320 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 15 Jul 2022 18:38:32 +0200 Subject: The checker requires Redis Remove the abstraction in searx.shared.SharedDict. Implement a basic and dedicated scheduler for the checker using a Redis script. --- searx/settings_defaults.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'searx/settings_defaults.py') diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index 6575b0b0c..a4f6ce607 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -225,7 +225,8 @@ SCHEMA = { 'plugins': SettingsValue(list, []), 'enabled_plugins': SettingsValue((None, list), None), 'checker': { - 'off_when_debug': SettingsValue(bool, True), + 'off_when_debug': SettingsValue(bool, True, None), + 'scheduling': SettingsValue((None, dict), None, None), }, 'categories_as_tabs': SettingsValue(dict, CATEGORIES_AS_TABS), 'engines': SettingsValue(list, []), -- cgit v1.2.3 From e92755d358df5b34b0181f48f8ba02c7f2939e8f Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Fri, 14 Oct 2022 13:27:07 +0000 Subject: Initialize Redis in searx/webapp.py 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. --- searx/settings_defaults.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/settings_defaults.py') diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index a4f6ce607..470290f92 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -174,7 +174,7 @@ SCHEMA = { 'default_http_headers': SettingsValue(dict, {}), }, 'redis': { - 'url': SettingsValue(str, 'unix:///usr/local/searxng-redis/run/redis.sock?db=0'), + 'url': SettingsValue((None, False, str), False), }, 'ui': { 'static_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'static')), -- cgit v1.2.3