# HG changeset patch # User Sylvain Thénault # Date 1253701394 -7200 # Node ID fb17a54b358ce941dca2f356f7aea44beb3c9fac # Parent d74c627981e1c1181e1afe12190cb3599bd88e89 unregister hooks by using category diff -r d74c627981e1 -r fb17a54b358c server/checkintegrity.py --- a/server/checkintegrity.py Wed Sep 23 12:23:00 2009 +0200 +++ b/server/checkintegrity.py Wed Sep 23 12:23:14 2009 +0200 @@ -68,8 +68,6 @@ """reindex all entities in the repository""" # deactivate modification_date hook since we don't want them # to be updated due to the reindexation - from cubicweb.server.hooks import (setmtime_before_update_entity, - uniquecstrcheck_before_modification) from cubicweb.server.repository import FTIndexEntityOp repo = session.repo cursor = session.pool['system'] @@ -80,10 +78,8 @@ # XXX indexer.init_fti(cursor) once index 0.7 is out indexer.init_extensions(cursor) cursor.execute(indexer.sql_init_fti()) - repo.hm.unregister_hook(setmtime_before_update_entity, - 'before_update_entity', '') - repo.hm.unregister_hook(uniquecstrcheck_before_modification, - 'before_update_entity', '') + repo.config.disabled_hooks_categories.add('metadata') + repo.config.disabled_hooks_categories.add('integrity') repo.do_fti = True # ensure full-text indexation is activated etypes = set() for eschema in schema.entities():