How can I update the schema of a single archetype object upon request in plone?

I have hundreds of thousands of objects based on plone archetypes (plone 2.5.X) that need their archetype scheme updated to the latest. The archetype schema migration tool is great for small / medium objects, but brings my server to its knees, trying to transfer them all, right down to the point where I always destroy the script. I would like to be able to update the schema of one object at a time, potentially as an object that was retrieved - is this possible? If not, then any other approaches to updating archetype schemes on large plone sites?

Thanks in advance!

+5
source share
2

, 2.5, :

if not self._isSchemaCurrent():
    logging.debug("updating schema for %s"%self.absolute_url())
        try:
            import transaction
            transaction.begin()
            self._updateSchema()
            transaction.commit()
        except Exception, e:
            logging.error('Error updating schema at %s: %s'%(self.absolute_url(), e))
            return False
else:
    logging.debug("schema for %s is up to date"%self.absolute_url())
    return True

, Plone 2.5.3 , plone 3, . , processForm, , , . at_post_edit_script, - . , , .

, - . !

+5

, " ", , . , , script . .commit() ( 100 1000 ) .

Edit: , . , .

0

All Articles