- Timestamp:
- 7 Nov 2019, 13:20:25 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/meta.py
r8389 r15769 35 35 """ 36 36 import grok 37 import grokcore.component 37 38 import martian 38 39 from grok import components … … 40 41 from martian.error import GrokError 41 42 from zope import component 43 from zope.processlifetime import IDatabaseOpened 42 44 from waeup.kofa.interfaces import IObjectUpgradeEvent 43 45 … … 106 108 pass 107 109 #site.logger.info('Catalog `%s` ready.' % self.catalog_name) 110 111 112 113 @grokcore.component.subscribe(IDatabaseOpened) 114 def disable_broken_handlers(event): 115 """This one is fired after ZODB setup. 116 117 Unregsiter handlers etc., that are broken or meant trouble in the past. 118 """ 119 from zope.component import getGlobalSiteManager 120 from zope.catalog.catalog import indexAdded 121 worked = getGlobalSiteManager().unregisterHandler(indexAdded) 122 if worked: 123 print("Unregistered handler zope.catalog.catalog.indexAdded") 124 # TODO: register a replacement that copes better with large indexes.
Note: See TracChangeset for help on using the changeset viewer.