From: Andrew Ruthven Date: Mon, 22 Jun 2009 09:44:31 +0000 (+1200) Subject: Switch to PostgreSQL. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e672911578db8ac9a809785787ea37e17ac37adb;p=whoisi.git Switch to PostgreSQL. --- diff --git a/publisher-service b/publisher-service index abde231..f41f577 100755 --- a/publisher-service +++ b/publisher-service @@ -79,16 +79,15 @@ class MasterConnectionController(pb.Root): dcm = None -def mysql_service_setup(): +def db_service_setup(): global dcm - connection_type = "MySQLdb" + connection_type = "pyscopg2" connection_dict = dict(cp_reconnect=True, host=config.get("db", "host"), - user=config.get("db", "user"), - passwd=config.get("db", "passwd"), + username=config.get("db", "user"), + password=config.get("db", "passwd"), db=config.get("db", "db"), - port=config.getint("db", "port"), - charset="utf8") + port=config.getint("db", "port")) dcm = DatabaseCommandManager() dcm.start(connection_type, connection_dict) @@ -123,7 +122,7 @@ port = config.getint("listen", "port") client_port = config.getint("client-listen", "port") # set up the database -mysql_service_setup() +db_service_setup() # Set up our main service that glues everything together ps = PublisherService()