summaryrefslogtreecommitdiff
path: root/searx/shared/__init__.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-12-27 09:26:22 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2021-12-27 09:26:22 +0100
commit3d96a9839a12649874b6d4cf9466bd3616b0a03c (patch)
treee7d54d1e345b1e792d538ddc250f4827bb2fd9b9 /searx/shared/__init__.py
parentfcdc2c2cd26e24c2aa3f064d93cee3e29dc2a30c (diff)
downloadsearxng-3d96a9839a12649874b6d4cf9466bd3616b0a03c.tar.gz
searxng-3d96a9839a12649874b6d4cf9466bd3616b0a03c.zip
[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>
Diffstat (limited to 'searx/shared/__init__.py')
-rw-r--r--searx/shared/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/searx/shared/__init__.py b/searx/shared/__init__.py
index cbe24d239..98c9a11c2 100644
--- a/searx/shared/__init__.py
+++ b/searx/shared/__init__.py
@@ -9,6 +9,7 @@ try:
except:
# no uwsgi
from .shared_simple import SimpleSharedDict as SharedDict, schedule
+
logger.info('Use shared_simple implementation')
else:
try:
@@ -17,15 +18,19 @@ else:
raise Exception()
except:
# uwsgi.ini configuration problem: disable all scheduling
- logger.error('uwsgi.ini configuration error, add this line to your uwsgi.ini\n'
- 'cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1')
+ logger.error(
+ 'uwsgi.ini configuration error, add this line to your uwsgi.ini\n'
+ 'cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1'
+ )
from .shared_simple import SimpleSharedDict as SharedDict
def schedule(delay, func, *args):
return False
+
else:
# uwsgi
from .shared_uwsgi import UwsgiCacheSharedDict as SharedDict, schedule
+
logger.info('Use shared_uwsgi implementation')
storage = SharedDict()