示例#1
0
 def wrapper(self, days=0, REQUEST=None):
     """ Wrapper to pack disk files
     """
     path = os.path.join(INSTANCE_HOME, *REPOSITORY_PATH)
     pack_disk(path)
     if zope_version <= 2.7:
         context = _get_application_manager(self)
     else:
         context = self
     return method(context, days=days, REQUEST=REQUEST)
示例#2
0
    def am_manage_pack(self, days=0, REQUEST=None):
        """ Override manage pack in order to delete .undo files from disk."""
        # Run disk packing in separate thread
        path = os.path.join(INSTANCE_HOME, *REPOSITORY_PATH)
        pack_disk(path)

        t = self.__old_manage_pack(days, None)

        if REQUEST is not None:
            REQUEST['RESPONSE'].redirect(REQUEST['URL1'] + '/manage_workspace')
        return t
示例#3
0
        def am_manage_pack(self, days=0, REQUEST=None):
            """ Override manage pack in order to delete .undo files from disk."""
            # Run disk packing in separate thread
            path = os.path.join(INSTANCE_HOME, *config.location)
            pack_disk(path)

            t = self.__old_manage_pack(days, None)

            if REQUEST is not None:
                REQUEST["RESPONSE"].redirect(REQUEST["URL1"] + "/manage_workspace")
            return t