Пример #1
0
def localInitiate(request):
    try:
        data = json.loads(request.body)
        randomFile = data['randomFile']

        if os.path.exists(randomFile):
            wm = BackupManager()
            return wm.submitBackupCreation(1, json.loads(request.body))
    except BaseException, msg:
        logging.writeToFile(str(msg))
Пример #2
0
def submitBackupCreation(request):
    try:
        userID = request.session['userID']

        result = pluginManager.preSubmitBackupCreation(request)
        if result != 200:
            return result

        wm = BackupManager()
        coreResult =  wm.submitBackupCreation(userID, json.loads(request.body))

        return coreResult

    except BaseException, msg:
        logging.writeToFile(str(msg))