Skip to content
Snippets Groups Projects
Commit 527dca9b authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

fixing config

parent 8c7df088
No related branches found
No related tags found
No related merge requests found
Pipeline #
from datetime import timedelta
# DO NOT MODIFY THIS FILE!
DEBUG = False
TESTING = False
REDIS_HOST = '127.0.0.1'
REDIS_PORT = '6379'
CELERY_BROKER_URL = 'amqp://'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379'
PERMANENT_SESSION_LIFETIME = 60 * 60 * 24
BROKER_URL = 'amqp://'
CELERY_RESULT_BACKEND = 'redis://{}:{}'.format(REDIS_HOST, REDIS_PORT)
PERMANENT_SESSION_LIFETIME = timedelta(days=1)
# DO NOT MODIFY THIS FILE!
import datetime
from uuid import uuid4
from redis import StrictRedis
......@@ -46,9 +45,7 @@ class RedisSessionInterface(SecureCookieSessionInterface):
response.delete_cookie(app.session_cookie_name, domain=domain)
return None
session_expiration_time = app.config['PERMANENT_SESSION_LIFETIME']
cookie_expiration_time = (datetime.datetime.utcnow() +
datetime.timedelta(
seconds=session_expiration_time))
cookie_expiration_time = self.get_expiration_time(app, session)
serialzed_session_data = self.serializer.dumps(dict(session))
self.redis.setex(name='session:{}'.format(session.sid),
time=session_expiration_time,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment