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)
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()