Commit 7ba3c672 authored by Gero Müller's avatar Gero Müller
Browse files

fix int config usage

parent 3542432b
......@@ -261,17 +261,17 @@ class Server(object):
def __init_database(self, **kwargs):
sa_identifier = vispa.config('database', 'sqlalchemy.url',
'sqlite:///%s/vispa.db' % self.var_dir)
pool_size = int(vispa.config('database', 'sqlalchemy.pool_size', '10'))
max_overflow = int(vispa.config(
pool_size = vispa.config('database', 'sqlalchemy.pool_size', 10)
max_overflow = vispa.config(
'database',
'sqlalchemy.max_overflow',
'10'))
10)
# https://github.com/mitsuhiko/flask-sqlalchemy/issues/2
# http://docs.sqlalchemy.org/en/latest/core/pooling.html#dealing-with-disconnects
pool_recycle = int(vispa.config(
pool_recycle = vispa.config(
'database',
'sqlalchemy.pool_recycle',
'7200'))
7200)
logger.info('Use database %s.' % sa_identifier)
try:
self._engine = sqlalchemy.create_engine(
......
......@@ -269,8 +269,8 @@ class CleanerThread(Thread):
Thread.__init__(self, *kargs, **kwargs)
self.daemon = True
self.running = True
self.session_timeout = int(vispa.config("web", "session_timeout", 3600))
self.session_interval = int(vispa.config("web", "session_interval", 60))
self.session_timeout = vispa.config("web", "session_timeout", 3600)
self.session_interval = vispa.config("web", "session_interval", 60)
cherrypy.engine.subscribe("exit", self._exit)
def _exit(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment