Merge pull request #92 from Tonow-c2c/BSRD-286_MIG-13.0_session_redis

BSRD-286: MIG V13 session_redis
This commit is contained in:
Tonow-c2c
2019-11-08 08:20:00 +01:00
committed by GitHub
co-authored by GitHub
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{'name': 'Sessions in Redis', {'name': 'Sessions in Redis',
'summary': 'Store web sessions in Redis', 'summary': 'Store web sessions in Redis',
'version': '12.0.1.0.0', 'version': '13.0.1.0.0',
'author': 'Camptocamp,Odoo Community Association (OCA)', 'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3', 'license': 'AGPL-3',
'category': 'Extra Tools', 'category': 'Extra Tools',
@@ -14,5 +14,5 @@
}, },
'website': 'http://www.camptocamp.com', 'website': 'http://www.camptocamp.com',
'data': [], 'data': [],
'installable': False, 'installable': True,
} }
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging import logging
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import json import json
@@ -18,7 +18,7 @@ class RedisSessionStore(SessionStore):
def __init__(self, redis, session_class=None, def __init__(self, redis, session_class=None,
prefix='', expiration=None): prefix='', expiration=None):
super(RedisSessionStore, self).__init__(session_class=session_class) super().__init__(session_class=session_class)
self.redis = redis self.redis = redis
if expiration is None: if expiration is None:
self.expiration = DEFAULT_SESSION_TIMEOUT self.expiration = DEFAULT_SESSION_TIMEOUT