Changeset 12867 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 20 Apr 2015, 17:32:55 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
r12861 r12867 284 284 def doImport(self, path, headerfields, mode='create', user='Unknown', 285 285 logger=None, ignore_empty=True): 286 """Perform actual import. 286 """In contrast to most other methods, ``doImport`` is not supposed to 287 be customized, neither in custom packages nor in derived batch 288 processor classes. Therefore, this is the only place where we 289 do import data. 290 291 Before this method starts creating or updating persistent data, it 292 prepares two more files in a temporary folder of the filesystem: (1) 293 a file for pending data with file extension ``.pending`` and (2) 294 a file for successfully processed data with file extension 295 ``.finished``. Then the method starts iterating over all rows of 296 the CSV file. Each row is treated as follows: 297 298 1. An empty row is skipped. 299 300 2. Empty strings are replaced by ignore-markers. 301 302 3. The `BatchProcessor.checkConversion` method validates all 303 values in the row. If the validation fails 304 305 4. 306 307 5. 308 309 6. 310 287 311 """ 288 312 time_start = time.time()
Note: See TracChangeset for help on using the changeset viewer.