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