Cambio de rutas en cache de sesiones
This commit is contained in:
parent
8642769580
commit
04fda8b9a2
|
@ -12,9 +12,10 @@ source/fixtures
|
|||
source/media
|
||||
|
||||
# Sphinx documentation
|
||||
docs/
|
||||
*.xlsx
|
||||
|
||||
docs/
|
||||
cache/
|
||||
credenciales.conf
|
||||
*.sqlite
|
||||
*.sql
|
||||
|
|
|
@ -20,6 +20,9 @@ from controllers.main import (AppEmpresas,
|
|||
)
|
||||
|
||||
|
||||
from settings import PATH_SESSIONS
|
||||
|
||||
|
||||
db = StorageEngine()
|
||||
|
||||
api = falcon.API(middleware=[
|
||||
|
@ -54,13 +57,12 @@ api.add_route('/movbanco', AppMovimientosBanco(db))
|
|||
# ~ Activa si usas waitress y NO estas usando servidor web
|
||||
# ~ api.add_sink(static, '/static')
|
||||
|
||||
|
||||
session_options = {
|
||||
'session.type': 'file',
|
||||
'session.cookie_expires': True,
|
||||
'session.httponly': True,
|
||||
'session.data_dir': '/tmp/cache/data',
|
||||
'session.lock_dir': '/tmp/cache/lock',
|
||||
'session.data_dir': PATH_SESSIONS['data'],
|
||||
'session.lock_dir': PATH_SESSIONS['lock'],
|
||||
}
|
||||
app = SessionMiddleware(api, session_options)
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ VERSION = '1.2.0'
|
|||
EMAIL_SUPPORT = ('soporte@empresalibre.net',)
|
||||
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
PATH_STATIC = os.path.abspath(os.path.join(BASE_DIR, '..'))
|
||||
PATH_TEMPLATES = os.path.abspath(os.path.join(BASE_DIR, '..', 'templates'))
|
||||
PATH_MEDIA = os.path.abspath(os.path.join(BASE_DIR, '..', 'docs'))
|
||||
|
@ -33,6 +34,11 @@ PATH_CP = os.path.abspath(os.path.join(BASE_DIR, '..', 'db', 'cp.db'))
|
|||
COMPANIES = os.path.abspath(os.path.join(BASE_DIR, '..', 'db', 'rfc.db'))
|
||||
DB_SAT = os.path.abspath(os.path.join(BASE_DIR, '..', 'db', 'sat.db'))
|
||||
|
||||
PATH_SESSIONS = {
|
||||
'data': os.path.abspath(os.path.join(BASE_DIR, '..', 'cache', 'data')),
|
||||
'lock': os.path.abspath(os.path.join(BASE_DIR, '..', 'cache', 'lock')),
|
||||
}
|
||||
|
||||
IV = 'valores_iniciales.json'
|
||||
INIT_VALUES = os.path.abspath(os.path.join(BASE_DIR, '..', 'db', IV))
|
||||
CT = 'cancel_template.xml'
|
||||
|
|
Loading…
Reference in New Issue