Commit graph

5 commits

Author SHA1 Message Date
Markus Heiser
4809bf705c [mod] shared.storage: implement a backend to store in the redis DB
- implement shared_redis.RedisCacheSharedDict to store key/value pairs in the
  redis DB.  The default key_prefix is 'SearXNG_SharedDict'.

- simplify searx.shared and import RedisCacheSharedDict, set
  key_prefix to 'SearXNG_storage'

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-09-24 19:56:14 +02:00
Martin Fischer
7f89adc5f3 [pyright:strict] searx.shared.shared_abstract 2022-01-27 22:07:12 +01:00
Markus Heiser
3d96a9839a [format.python] initial formatting of the python code
This patch was generated by black [1]::

    make format.python

[1] https://github.com/psf/black

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 09:26:22 +01:00
Alexandre Flament
a0c8b413a6 [mod] searx.shared: minor tweaks
searx.shared.shared_abstract.SharedDict inherit from abc.ABC
searx.shared.shared_uwsgi.schedule can schedule multiple functions without issue
2021-01-12 11:47:17 +01:00
Alexandre Flament
6e2872f436 [enh] add searx.shared
shared dictionary between the workers (UWSGI or werkzeug)
scheduler: run a task once every x seconds (UWSGI or werkzeug)
2021-01-12 11:47:17 +01:00