From e672911578db8ac9a809785787ea37e17ac37adb Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Mon, 22 Jun 2009 21:44:31 +1200 Subject: [PATCH] Switch to PostgreSQL. --- publisher-service | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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() -- 2.30.2