Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Starting bug fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
lcoandrade committed Apr 4, 2016
1 parent 0a2bfe1 commit bf6d808
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CGI/configurecluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def message(msg):
message('Problema na criação do cluster: Versão de bancos incompatível com o plugin (Use somente EDGV 2.1.3 ou FTer_2a_Ed)')

slony_temp = updateScript(slony, masterdb, slavedb, masterhost, slavehost, masterport, slaveport, masteruser, masterpass, slaveuser, slavepass, clustername)
message(slony)
message(slony_temp)

# Configuring slony and subscribing
cmd = 'sh {}'.format(slony_temp)
Expand Down
13 changes: 7 additions & 6 deletions dsg_management_tools_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def on_createClusterButton_clicked(self):
if not supplied:
return

#cheking slave's database version
#checking slave's database version
db = self.getConnection(slavedb, slavehost, slaveport, slaveuser, slavepass)
slaveversion = self.getDatabaseVersion(db)

Expand All @@ -250,7 +250,7 @@ def on_createClusterButton_clicked(self):
if not supplied:
return

#cheking master's database version
#checking master's database version
db = self.getConnection(masterdb, masterhost, masterport, masteruser, masterpass)
masterversion = self.getDatabaseVersion(db)

Expand Down Expand Up @@ -281,7 +281,7 @@ def on_startReplicationButton_clicked(self):
if not supplied:
return

#cheking slave's database version
#checking slave's database version
db = self.getConnection(slavedb, slavehost, slaveport, slaveuser, slavepass)
slaveversion = self.getDatabaseVersion(db)

Expand All @@ -290,7 +290,7 @@ def on_startReplicationButton_clicked(self):
if not supplied:
return

#cheking master's database version
#checking master's database version
db = self.getConnection(masterdb, masterhost, masterport, masteruser, masterpass)
masterversion = self.getDatabaseVersion(db)

Expand Down Expand Up @@ -416,9 +416,10 @@ def on_refreshButton_clicked(self):
children.append(text)

def getDatabaseVersion(self, db):
version = '-1'
if not db.open():
return '-1'
sqlVersion = 'SELECT edgvversion FROM public_db_metadata LIMIT 1'
return version
sqlVersion = 'SELECT edgvversion FROM db_metadata LIMIT 1'
queryVersion = QSqlQuery(sqlVersion, db)
while queryVersion.next():
version = queryVersion.value(0)
Expand Down

0 comments on commit bf6d808

Please sign in to comment.