Skip to content
Permalink
Browse files

bug fix: wp stating

  • Loading branch information
usmannasir committed Dec 7, 2019
1 parent 963a5de commit 25854037a80a08cd0af0f227975cc521eceb8da4
Showing with 7 additions and 5 deletions.
  1. +0 −1 api/tests.py
  2. +7 −4 websiteFunctions/StagingSetup.py
@@ -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)

@@ -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']
@@ -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)
@@ -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

@@ -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:

0 comments on commit 2585403

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