bug fix: wp stating

This commit is contained in:
Usman Nasir
2019-12-07 18:06:00 +05:00
parent 963a5de0c4
commit 25854037a8
2 changed files with 7 additions and 5 deletions

View File

@@ -163,7 +163,6 @@ class TestAPI(TestCase):
"securityLevel": "HIGH",
}
response = self.MakeRequest('submitUserCreation', data_ret)
logging.writeToFile(str(response))
self.assertEqual(response['status'], 1)

View File

@@ -29,6 +29,7 @@ class StagingSetup(multi.Thread):
def startCloning(self):
try:
tempStatusPath = self.extraArgs['tempStatusPath']
self.tempStatusPath = tempStatusPath
masterDomain = self.extraArgs['masterDomain']
domain = self.extraArgs['domain']
admin = self.extraArgs['admin']
@@ -102,7 +103,6 @@ class StagingSetup(multi.Thread):
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)
@@ -145,12 +145,15 @@ class StagingSetup(multi.Thread):
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
@@ -159,7 +162,7 @@ class StagingSetup(multi.Thread):
return 0
except BaseException, msg:
mesg = '%s. [404]' % (str(msg))
logging.statusWriter(tempStatusPath, mesg)
logging.statusWriter(self.tempStatusPath, mesg)
def startSyncing(self):
try: