[Osaas-commits] r15 - in trunk: . server/osaas

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 28 16:16:38 CEST 2007


Author: bh
Date: 2007-08-28 16:16:38 +0200 (Tue, 28 Aug 2007)
New Revision: 15

Modified:
   trunk/ChangeLog
   trunk/server/osaas/run.py
Log:
* server/osaas/run.py (OSAASServerProgram.instantiate_server):
Instantiate the DBBackend and pass it to the server


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-08-28 14:14:28 UTC (rev 14)
+++ trunk/ChangeLog	2007-08-28 14:16:38 UTC (rev 15)
@@ -1,5 +1,10 @@
 2007-08-28  Bernhard Herzog  <bh at intevation.de>
 
+	* server/osaas/run.py (OSAASServerProgram.instantiate_server):
+	Instantiate the DBBackend and pass it to the server
+
+2007-08-28  Bernhard Herzog  <bh at intevation.de>
+
 	* server/osaas/server.py (OSAASServer.__init__): Rename the
 	dbhandler parameter to dbbackend.  If a dbbackend object is passed
 	in, use the backend's handle_record method in the dbthreadpool

Modified: trunk/server/osaas/run.py
===================================================================
--- trunk/server/osaas/run.py	2007-08-28 14:14:28 UTC (rev 14)
+++ trunk/server/osaas/run.py	2007-08-28 14:16:38 UTC (rev 15)
@@ -8,6 +8,7 @@
 from osaas.http.run import ServerProgram
 from osaas.server import OSAASServer
 from osaas.config import OSAASOption, read_config_file
+from osaas.dbbackend import DBBackend
 
 class OSAASProgramMixin:
 
@@ -36,7 +37,10 @@
         return parser
 
     def instantiate_server(self, server_class, server_address, opts, **kw):
-        return server_class(server_address, userdbfile=opts.userdb_file, **kw)
+        dbbackend = DBBackend((opts.db_user, opts.db_password, opts.db_dsn),
+                              opts.db_rules)
+        return server_class(server_address, userdbfile=opts.userdb_file,
+                            dbbackend=dbbackend, **kw)
 
 
 



More information about the Osaas-commits mailing list