Skip to content

Commit

Permalink
bug fix: wp stating
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Dec 7, 2019
1 parent 963a5de commit 2585403
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def test_submitUserCreation(self):
"securityLevel": "HIGH",
}
response = self.MakeRequest('submitUserCreation', data_ret)
logging.writeToFile(str(response))

self.assertEqual(response['status'], 1)

Expand Down
11 changes: 7 additions & 4 deletions websiteFunctions/StagingSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def run(self):
def startCloning(self):
try:
tempStatusPath = self.extraArgs['tempStatusPath']
self.tempStatusPath = tempStatusPath
masterDomain = self.extraArgs['masterDomain']
domain = self.extraArgs['domain']
admin = self.extraArgs['admin']
Expand Down Expand Up @@ -102,7 +103,6 @@ def startCloning(self):
else:
raise BaseException('Failed to create database backup.')


databasePath = '%s/%s.sql' % ('/home/cyberpanel', dbName)

command = "sed -i 's/%s/%s/g' %s" % (masterDomain, domain, databasePath)
Expand Down Expand Up @@ -145,12 +145,15 @@ def startCloning(self):
writeToFile.close()

command = 'mv %s %s' % (tmp, pathFinalConfig)
ProcessUtilities.executioner(command, website.externalApp)
ProcessUtilities.executioner(command)

command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, pathFinalConfig)
ProcessUtilities.executioner(command)

logging.statusWriter(tempStatusPath, 'Database synced..,100')

try:
os.path.remove(databasePath)
os.remove(databasePath)
except:
pass

Expand All @@ -159,7 +162,7 @@ def startCloning(self):
return 0
except BaseException, msg:
mesg = '%s. [404]' % (str(msg))
logging.statusWriter(tempStatusPath, mesg)
logging.statusWriter(self.tempStatusPath, mesg)

def startSyncing(self):
try:
Expand Down

0 comments on commit 2585403

Please sign in to comment.