예제 #1
0
    def archive(self, project):
        """ Archive a given project
        """
        process = self.__create_archiving_process(project)

        commander = Commander()
        for step in process:
            if not commander.run(step):
                conf.log.debug("Archiving failed on step: " + step.name)
                conf.log.debug("    project: " + str(project.env_name))
                conf.log.debug("    message: " + str(step.errormsg))
                # We wont rollback archiving even when error occurs
                return False
        return True
예제 #2
0
    def archive(self, project):
        """ Archive a given project
        """
        process = self.__create_archiving_process(project)

        commander = Commander()
        for step in process:
            if not commander.run(step):
                conf.log.debug("Archiving failed on step: " + step.name)
                conf.log.debug("    project: " + str(project.env_name))
                conf.log.debug("    message: " + str(step.errormsg))
                # We wont rollback archiving even when error occurs
                return False
        return True
예제 #3
0
    def restore(self, project_archive_id, notifier):
        """ Restore archived project
        """
        project = self.get_archived_project(project_archive_id)
        project.id = None

        process = self.__create_restoring_process(project, notifier)
        commander = Commander()

        for step in process:
            if not commander.run(step):
                conf.log.debug("Restoring failed on step: " + step.name)
                conf.log.debug("    project: " + str(project.env_name))
                conf.log.debug("    message: " + str(step.errormsg))
                # No rollbacks
                return False
        return True
예제 #4
0
    def restore(self, project_archive_id, notifier):
        """ Restore archived project
        """
        project = self.get_archived_project(project_archive_id)
        project.id = None

        process = self.__create_restoring_process(project, notifier)
        commander = Commander()

        for step in process:
            if not commander.run(step):
                conf.log.debug("Restoring failed on step: " + step.name)
                conf.log.debug("    project: " + str(project.env_name))
                conf.log.debug("    message: " + str(step.errormsg))
                # No rollbacks
                return False
        return True