Skip to content

Instantly share code, notes, and snippets.

@jd
Created January 28, 2014 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jd/8666438 to your computer and use it in GitHub Desktop.
Save jd/8666438 to your computer and use it in GitHub Desktop.
def create_engine(sql_connection, sqlite_fk=False,
mysql_traditional_mode=False):
return session.create_engine(sql_connection,
sqlite_fk,
mysql_traditional_mode,
idle_timeout=CONF.database.idle_timeout,
connection_debug=CONF.databse.connection_debug,
max_pool_size=CONF.database.max_pool_size,
max_overflow=CONF.database.max_overflow,
pool_timeout=CONF.database.pool_timeout,
sqlite_synchronous=CONF.database.sqlite_synchronous,
connection_trace=CONF.database.connection_trace,
max_retries=CONF.database.max_retries,
retry_internval=CONF.database.retry_interval)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment