Changeset 15748 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 4 Nov 2019, 10:15:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py
r15739 r15748 27 27 import shutil 28 28 import tempfile 29 import transaction 29 30 import grok 30 31 from cStringIO import StringIO … … 956 957 uids = get_catalog_docids(cat) 957 958 print("Found %s entries..." % len(uids)) 958 for docid in uids:959 for n, docid in enumerate(uids): 959 960 ob = uidutil.getObject(docid) 960 961 cat.index_doc(docid, ob) 962 # indexes can become huge. commit changes every 5000th round to 963 # keep the memory footprint of catalogs `updateIndex` manageable 964 if not n % 5000: 965 transaction.commit() 961 966 d2 = datetime.datetime.now() 962 967 print("Finished. %s" % (d2 - d1))
Note: See TracChangeset for help on using the changeset viewer.