server/checkintegrity.py
branchtls-sprint
changeset 713 5adb6d8e5fa7
parent 381 e51deabc9b6a
child 1016 26387b836099
equal deleted inserted replaced
712:ce49e3885453 713:5adb6d8e5fa7
    82             etypes.add(container)
    82             etypes.add(container)
    83     print 'Reindexing entities of type %s' % \
    83     print 'Reindexing entities of type %s' % \
    84           ', '.join(sorted(str(e) for e in etypes))
    84           ', '.join(sorted(str(e) for e in etypes))
    85     pb = ProgressBar(len(etypes) + 1)
    85     pb = ProgressBar(len(etypes) + 1)
    86     # first monkey patch Entity.check to disable validation
    86     # first monkey patch Entity.check to disable validation
    87     from cubicweb.common.entity import Entity
    87     from cubicweb.entity import Entity
    88     _check = Entity.check
    88     _check = Entity.check
    89     Entity.check = lambda self, creation=False: True
    89     Entity.check = lambda self, creation=False: True
    90     # clear fti table first
    90     # clear fti table first
    91     session.system_sql('DELETE FROM %s' % session.repo.system_source.dbhelper.fti_table)
    91     session.system_sql('DELETE FROM %s' % session.repo.system_source.dbhelper.fti_table)
    92     pb.update()
    92     pb.update()