Skip to content
Permalink
Browse files

Always go through pg_ctl

  • Loading branch information...
m0rgen committed Jun 27, 2013
1 parent b4b5145 commit 99e949ac26dee194c8cd93ec2588a28a865915ef
Showing with 0 additions and 16 deletions.
  1. +0 −16 txdav/base/datastore/subpostgres.py
@@ -402,22 +402,6 @@ def createConnection():
createDatabaseCursor.execute("commit")
return createDatabaseConn, createDatabaseCursor

# TODO: always go through pg_ctl start
try:
createDatabaseConn, createDatabaseCursor = createConnection()
except pgdb.DatabaseError:
# We could not connect the database, so attempt to start it
pass
except Exception, e:
# Some other unexpected error is preventing us from connecting
# to the database
log.warn("Failed to connect to Postgres: {e}", e=e)
else:
# Database is running, so just use our connection
self.ready(createDatabaseConn, createDatabaseCursor)
self.deactivateDelayedShutdown()
return

monitor = _PostgresMonitor(self)
pgCtl = self.pgCtl()
# check consistency of initdb and postgres?

0 comments on commit 99e949a

Please sign in to comment.
You can’t perform that action at this time.