From 70bbd14b1ae122f2d1db7b8907d47394d549a149 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Tue, 8 Jun 2021 11:34:36 +0200 Subject: [mod] move hook to set Unix thread name into searx.unixthreadname requires setproctitle (but optional) --- searx/webapp.py | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'searx/webapp.py') diff --git a/searx/webapp.py b/searx/webapp.py index 9c2374200..9ce23d3c1 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -111,21 +111,6 @@ from searx.network import stream as http_stream from searx.search.checker import get_result as checker_get_result from searx.settings_loader import get_default_settings_path -# set Unix thread name -try: - import setproctitle -except ImportError: - pass -else: - import threading - old_thread_init = threading.Thread.__init__ - - def new_thread_init(self, *args, **kwargs): - # pylint: disable=protected-access, disable=c-extension-no-member - old_thread_init(self, *args, **kwargs) - setproctitle.setthreadtitle(self._name) - threading.Thread.__init__ = new_thread_init - logger = logger.getChild('webapp') # check secret_key -- cgit v1.2.3