disable syncschema hooks during db initialization
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 19 Oct 2009 20:01:34 +0200
changeset 3738 89871767fa82
parent 3737 e8c669e33689
child 3739 817e96eeac5c
disable syncschema hooks during db initialization
server/__init__.py
--- a/server/__init__.py	Mon Oct 19 20:01:14 2009 +0200
+++ b/server/__init__.py	Mon Oct 19 20:01:34 2009 +0200
@@ -216,7 +216,9 @@
         mhandler.exec_event_script('pre%s' % event, path)
     # enter instance'schema into the database
     mhandler.session.set_pool()
+    config.disabled_hooks_categories.add('syncschema')
     serialize_schema(mhandler.session, schema)
+    config.disabled_hooks_categories.remove('syncschema')
     # execute cubicweb's post<event> script
     mhandler.exec_event_script('post%s' % event)
     # execute cubes'post<event> script if any