mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Hacky solution to exclude cherrypy threads from sessions
This commit is contained in:
parent
4679121115
commit
2bfa770f60
1 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import cherrypy
|
import cherrypy
|
||||||
|
import threading
|
||||||
|
|
||||||
from plexpy import common
|
from plexpy import common
|
||||||
|
|
||||||
|
@ -24,7 +25,8 @@ def get_session_info():
|
||||||
"""
|
"""
|
||||||
from plexpy.webauth import SESSION_KEY
|
from plexpy.webauth import SESSION_KEY
|
||||||
|
|
||||||
if cherrypy.config.get('tools.sessions.on'):
|
# Hacky solution to exclude not cherrypy threads from sessions
|
||||||
|
if 'CP Server' in threading.current_thread().name and cherrypy.config.get('tools.sessions.on'):
|
||||||
_session = cherrypy.session.get(SESSION_KEY)
|
_session = cherrypy.session.get(SESSION_KEY)
|
||||||
if _session:
|
if _session:
|
||||||
return _session
|
return _session
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue