|
@@ -97,14 +97,14 @@ class CherryPyBenchmark(object):
|
|
|
return worlds
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- # Register the SQLAlchemy plugin
|
|
|
- from saplugin import SAEnginePlugin
|
|
|
- DBDRIVER = 'mysql'
|
|
|
- DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
|
|
|
- DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
|
|
|
- SAEnginePlugin(cherrypy.engine, DATABASE_URI).subscribe()
|
|
|
-
|
|
|
- # Register the SQLAlchemy tool
|
|
|
- from satool import SATool
|
|
|
- cherrypy.tools.db = SATool()
|
|
|
- cherrypy.quickstart(CherryPyBenchmark(), '', {'/': {'tools.db.on': True}})
|
|
|
+ # Register the SQLAlchemy plugin
|
|
|
+ from saplugin import SAEnginePlugin
|
|
|
+ DBDRIVER = 'mysql'
|
|
|
+ DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
|
|
|
+ DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
|
|
|
+ SAEnginePlugin(cherrypy.engine, DATABASE_URI).subscribe()
|
|
|
+
|
|
|
+ # Register the SQLAlchemy tool
|
|
|
+ from satool import SATool
|
|
|
+ cherrypy.tools.db = SATool()
|
|
|
+ cherrypy.quickstart(CherryPyBenchmark(), '', {'/': {'tools.db.on': True}})
|